Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new writer configuration option 'quoteAll' #47

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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.

None yet

1 participant