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

Consider Kotlinx Serialization for JSON as a Jackson/Gson/Jsonb equivalent #34410

Closed
bclozel opened this issue Feb 11, 2025 · 0 comments
Closed
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Feb 11, 2025

#21188 added support and auto-detection for Kotlinx Serialization.
As seen in spring-projects/spring-boot#24238, this is causing too much issues when Spring applications are consuming kotlin libraries bringing this dependency transitively. This converter shadows Jackson for Java enums, even after changes made in #26147.

This means we should consider this converter like Gson and Jsonb: a fallback replacement if Jackson is not present. Spring users can still add this converter to the list; we just won't make the mere presence of this library on the classpath as a strong enough signal. Spring Boot users can use HttpMessageConverters to add/alter the list of converters.

Because this is a breaking change, I'm scheduling this for 7.0.

@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Feb 11, 2025
@bclozel bclozel added this to the 7.0.0-M2 milestone Feb 11, 2025
@bclozel bclozel self-assigned this Feb 11, 2025
sdeleuze added a commit to sdeleuze/spring-framework that referenced this issue Feb 17, 2025
This commit introduces open polymorphism support with Kotlin
Serialization in HTTP converters and codecs as a follow-up of spring-projectsgh-34410
which considers Kotlin Serialization as a Jackson/Gson/Jsonb equivalent
(it is not anymore configured before Jackson).

Closes spring-projectsgh-34433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant