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

csv; how to modify the decimal separator? #360

Open
tomschulze opened this issue Dec 13, 2022 · 2 comments
Open

csv; how to modify the decimal separator? #360

tomschulze opened this issue Dec 13, 2022 · 2 comments

Comments

@tomschulze
Copy link

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);
@cowtowncoder
Copy link
Member

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

@tomschulze
Copy link
Author

okay. thank you for your quick feedback.

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

No branches or pull requests

2 participants