Skip to content

(csv) Support writing numbers as quoted Strings with CsvGenerator.Feature.ALWAYS_QUOTE_NUMBERSΒ #198

@trohovsky

Description

@trohovsky

It would be nice to have a CSV feature similar to JSON feature JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS. Enabling of the feature by mapper.enable(JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS) doesn't work for CSV.

I want to write an object of this class:

data class TestData(
        val integer: Int,
        val float: Float
}

as
"1","1.234"
not as
1,1.234

Metadata

Metadata

Assignees

No one assigned

    Labels

    csvgood first issueIssue that seems easy to resolve and is likely a good candidate for contributors new to project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions