Skip to content

Quote strings with leading/trailing spaces in csv (CsvWriteFeature.QUOTE_STRINGS_WITH_LEADING_TRAILING_WHITESPACE) #210

@sfzhi

Description

@sfzhi

I would like to suggest to add a feature flag to CsvGenerator, which, if enabled, would cause any string values that contain leading or trailing white space to always be quoted.
Some CSV parsers out there do not handle leading/trailing spaces very well, if unquoted. If Jackson needs to produce CSV for consumption by one of those parsers, currently it would have to resort to force quoting of all strings, which may be undesirable for a number of reasons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions