-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Writing CSV without schema is not supported despite the documentation says otherwise #114
Comments
Interesting. Yes, you are right, currently only schema-less reading is supported, although in theory it should be possible to also support writing of arrays/Lists. But whether it would be possible to expose such functionality via general databinding API is bit more difficult question. I guess the way it should work would be to allow writing of List/array values through One big problem would be to figure out if Now. All of above might not be what you are looking for. It depends on what
|
@cowtowncoder thank you for a prompt reply. I have described in details my requirements here: https://stackoverflow.com/questions/53174072/automatically-serialize-rest-controllers-to-csv-instead-of-json-in-spring-boot |
Ah! So this would sort of belong to FasterXML/jackson-jaxrs-providers#21 which would work for JAX-RS. Not sure if that'd help with Spring Boot (I forget how providers work there, Spring vs JAX-RS). |
I too have similar issue. Raised it here: adamsiemion, kindly suggest if you already found a solution to this. |
@Anchal2989 I don't think your problem is the same as you are defining For anyone else following this: for SO question, the important part is to construct and use a |
Hi @cowtowncoder, |
@Anchal2989 Sorry to hear you were not able to figure out a working way. I plan to write a blog some time this month to follow https://cowtowncoder.medium.com/reading-csv-with-jackson-c4e74a15ddc1 but this time talk about writing, using |
Not sure what could be done here, specifically, closing: may be re-filed with specific suggestions, asks. |
README says "But even if you do not know (or care) about column names you can read/write CSV documents". I think it is incorrect. It is impossible to write CSV without defining a schema first. Below code (in my example) will return
Unrecognized column 'name': known columns: ]
:This is because of the following code in CsvGenerator:
Would it be possible to add support for writing CSV without defining a schema first?
The text was updated successfully, but these errors were encountered: