We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
as reported here http://stackoverflow.com/questions/24569318/writing-multi-line-csv-with-jacksonrepresentation, the current JacksonRepresentation does not take into account correctly the serialization of collection of beans to CSV format. The objectWriter is not correctly set, and in addition it can't be correctly overriden by specifying the csv schema.
As workaround:
rep = new JacksonRepresentation<MyBean[]>(MediaType.TEXT_CSV, tab) { @Override protected ObjectWriter createObjectWriter() { CsvMapper csvMapper = (CsvMapper) getObjectMapper(); CsvSchema csvSchema = csvMapper.schemaFor(MyBean.class); ObjectWriter result = csvMapper.writer(csvSchema); return result; } };
The text was updated successfully, but these errors were encountered:
simpler way:
new JacksonRepresentation<List<MyBean>>(MediaType.TEXT_CSV, array) { @Override protected CsvSchema createCsvSchema(CsvMapper csvMapper) { return csvMapper.schemaFor(MyBean.class); } }
Sorry, something went wrong.
thboileau
No branches or pull requests
as reported here http://stackoverflow.com/questions/24569318/writing-multi-line-csv-with-jacksonrepresentation, the current JacksonRepresentation does not take into account correctly the serialization of collection of beans to CSV format.
The objectWriter is not correctly set, and in addition it can't be correctly overriden by specifying the csv schema.
As workaround:
The text was updated successfully, but these errors were encountered: