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
Provide GSON-based Encoder/Decoder #27131
Comments
We've discussed this issue as a team and we can consider this as an improvement, but we're not yet 100% about its timeline. Unlike Jackson, Gson doesn't support asynchronous parsing so we can't support the entire
On the other hand, we could still support a partial implementation of the
Would those limitations work for your use cases? Note that as pointed out in the StackOverflow answer's comments, the proposed implementation is seriously flawed for the streaming use case, since it assumes that incoming |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
It's not clear at this point whether a limited encoder/decoder support for GSON would be still helpful to the Spring community. If anyone is interested in this feature, please comment on this issue so we can reconsider this. |
Hello, I think a limited encoder/decoder would be really helpful to many users. |
Hi @chancekim - thanks for reaching out! |
Hi @bclozel ! |
Hi, wanted to double check if it's now possible to use this with 6.0.x |
@JevgenijZubovskij-UnlikelyAI this feature is not implemented and it's in the 6.X Backlog right now. We only got one person interested so far and we never got feedback on the limitations outlined above. |
The Stripe Java API (https://github.com/stripe/stripe-java) is a good use case. All of their models use Gson annotations. Having to re-write their models so they can be used in a WebFlux microservice has been a headache. |
@shanewow would the limitations listed in #27131 (comment) be acceptable for your use case? |
Affects: 5.3.6 (coming from Spring Boot 2.4.5)
Requirement: Provide GSON-base
Encoder/Decoder
by analogy withJackson2JsonEncoder/Jackson2JsonDecoder
(in webflux world) andGsonHttpMessageConverter
(in mvc world).Issue found (status closed): spring-projects/spring-boot#9166
Workaround found: https://stackoverflow.com/questions/60854660/set-custom-encoder-decoder-or-typeadapter-for-webclient-using-gson
Let me know if I need to provide more details.
The text was updated successfully, but these errors were encountered: