Skip to content

Conversation

JamesWidman
Copy link

Introduces a new encoder option.

Description

Example:

let encoder = CSVEncoder {
  // ...
  $0.quoteAll = true
}

The effect is that each field is quoted in the output regardless of whether it needs to be escaped. This may be useful for round-trip testing where the input file contains redundant quotation marks.

Checklist

The following list must only be fulfilled by code-changing PRs. If you are making changes on the documentation, ignore these.

  • Include in-code documentation at the top of the property/function/structure/class (if necessary).
  • Merge to develop.
  • Add to existing tests or create new tests (if necessary).

So you can now do:

    let encoder = CSVEncoder {
      // ...
      $0.quoteAll = true
    }

...with the effect that each field is quoted in the output regardless
of whether it needs to be escaped. This may be useful for round-trip
testing where the input file contains redundant quotation marks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant