-
Notifications
You must be signed in to change notification settings - Fork 37.7k
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 HttpMessageConverter [SPR-15457] #20018
Comments
Brian Clozel commented We already have an extensive support of Jackson - what do you think about jackson-dataformats-text CSV in that case? Wouldn't it require much less specific code in Spring Framework's codebase since the CSV schema is handled by Jackson itself (via annotations or a builder pattern)? I don't see a lot of activity on this library, nor new releases planned at the moment. I'll leave this issue opened for now and we'll see if other Spring developers think this might be useful and what library they've chosen. Thanks for your contribution! |
Julien Bouyoud commented Unfortunately, I have no real experience with jackson-dataformats-text CSV. Otherwise, it could replace super-csv as well. The purpose of this code base aims to answer to the following use cases :
I hope this help |
Hi, We are looking into implementing CSV If you think that it might be useful to have Jackson CSV support in Spring we can provide merge request. But there are some caveats. Jackson Dataformat CSV has some limitations. Most importantly, as @jBouyoud mentioned, it does not support deeply nested structures. In other words you can't just return any POJO. It needs to be "flat". In our use case that is ok, because we have a separate endpoints that returns only CSV so we can have flat DTO specifically for this endpoint. But it may not work as expected if applied to all endpoints in a service. If you apply it to average Another caveat is that the |
There hasn't been many requests for this feature over the last years. I believe that our existing We don't aim to provide codecs for the numerous formats supported by Jackson and other libraries. Instead we can implement the infrastructure here in Spring Framework to unlock such cases. I'm closing this issue as a result. Thanks for your contribution! |
Julien Bouyoud opened SPR-15457 and commented
Hi,
I'd like to submit a new HttpMessageConverter in spring-web module wich handle csv format.
Since csv is a schema like format, we needs to define it for each web-ressource.
Indeed, you may have multiple endpoints with same input data.
This purpose of this feature is to give to spring needed beans to defines those structured outputs.
I also suggest an implementation based on supra-csv library.
For now, this implementation support only serialization.
As exentention, i think it should be possible to move those schema definition by annotations (but needs more plumber to do this).
If you thinks this feature could be a part of spring-web, i can push a PR with those things.
Regards,
Julien
Reference URL: https://github.com/jBouyoud/spring-framework/tree/SPR-15457
The text was updated successfully, but these errors were encountered: