jackson-dataformats-text icon indicating copy to clipboard operation
jackson-dataformats-text copied to clipboard

csv; how to modify the decimal separator?

Open tomschulze opened this issue 3 years ago • 2 comments

There's an issue in the archived repo on this. I already checked the API docs. However, I did not find a way to change the decimal separator other than annotating my POJO or modifying its getters. The latter is what I have currently implemented.

Is there another way to change the decimal mark? I am not very familiar w/ the API.

I create an ObjectWriter like this:

CsvMapper mapper = new CsvMapper();
CsvSchema schema = mapper
  .typedSchemaFor(MyPojo.class)
  .withColumnReordering(true);

ObjectWriter csvWriter = mapper
  .writerWithSchemaFor(MyPojo.class)
  .with(schema);

tomschulze avatar Dec 13 '22 16:12 tomschulze

There is unfortunately no way to currently change number separators: serialization only uses decimal point.

cowtowncoder avatar Dec 14 '22 00:12 cowtowncoder

okay. thank you for your quick feedback.

tomschulze avatar Dec 14 '22 10:12 tomschulze