Has anyone noticed any differences in Json deseria...
# server
m
Has anyone noticed any differences in Json deserialization when upgrading to kotlin 1.5? We haven’t been able to confirm that it’s that exact change that did it, but it’s one of our guesses. We have some kotlin classes that have multiple @JvmStatic valueOf methods (that take different types), and one private constructor (that takes a long). Previously this was deserializing from json without any configuration. When we upgraded to kotlin 1.5 (from 1.4) and spring-boot 2.5 it stopped working specifically for the Kotlin classes (the java classes that are declared in an identical fashion as far as we can tell still work). We can get it to work by adding @JsonCreator to one of the valueOf methods, but we are a bit concerned that it’s going to be tricky to find all classes where the deserialization is broken.
h
As you're using Spring Boot, it should be easy to test, where the change comes from - change the Kotlin version (
kotlin.version
property if you're using Maven) back and see, if that fixes it. If it doesn't, change the
jackson.version
back. And if that doesn't change anything either, it's probably a Spring Boot issue. I can't really remember if we had any issues with JSON - we did the upgrade to Kotlin 1.5 quite a while back (even before the Spring Boot 2.5 upgrade).