-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
Serialization behavior of case objects is different when using scala 2.13 #429
Comments
I'm not really sure what is wrong. The difference I can see is at https://github.com/FasterXML/jackson-module-scala/blob/master/src/main/scala/com/fasterxml/jackson/module/scala/introspect/BeanIntrospector.scala#L170 - the CaseObjectExample$ class has fields in scala 2.12.10 but in scala 2.13, while getDeclaredFields returns the fields, they get filtered out in the for comprehension. |
the diff I think is in https://github.com/FasterXML/jackson-module-scala/blob/master/src/main/scala/com/fasterxml/jackson/module/scala/introspect/BeanIntrospector.scala#L102 - the fields are static in scala 2.13 and non-static in scala 2.12 |
Lovely. |
Fix in 2.9.10 and will be in 2.10.0 - a bit of a hack but it will have to do for now |
Confirmed it fixed the issues I was seeing. Thanks for the quick follow up. |
When using scala 2.12.10 it will serialize the fields of the case object. Using scala 2.13.1 it creates an empty object. Test case:
Results:
The text was updated successfully, but these errors were encountered: