-
Notifications
You must be signed in to change notification settings - Fork 38.5k
kotlinx.serialization not used for serializing collections #27232
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
Comments
If I understand correctly, even if we configure to use kotlinx.serialization, Spring still needs Jackson in dependencies. Could someone please explain why? when Jackson must be used instead of kotlinx? and how to check which one is using? Currently, if I remove Jackson and return a Sorry for too many questions. |
Hi, sorry for the delay. Based on kotlinx.serialization source code, I would expect serialization work as expected with If you are trying to serialize a thitrd party interface, you may be blocked by Kotlin/kotlinx.serialization#2060 but that one is not on Spring side. Could you please provide a repro? |
@sdeleuze thanks for pointing to the relevant ticket! |
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. |
Affects: 5.3.9
With kotlinx.serialization and Jackson (because of actuator) on the classpath, if a collection such as a
List<T>
is serialized as the response, Jackson will be used instead of kotlinx.serialization. This can cause problems if using@SerialName
since Jackson will ignore those.This only applies if the collection itself is intended to be the response body, so if a
@Serializable
class contains a collection it will still be serialized normally using kotlinx.serialization.The text was updated successfully, but these errors were encountered: