You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if this is a feature or a bug but a quick search didn't return anything (or I didn't see it), or if this is something that only happens for Kotlin users.
importcom.fasterxml.jackson.databind.ObjectMapperimportcom.fasterxml.jackson.module.kotlin.jacksonObjectMapperval m =ObjectMapper()
val j = jacksonObjectMapper()
data classA(valsomeValue:String = "")
data classB(valsValue:String = "")
data classC(valrPoi:String = "")
m.writeValueAsString(A("cow").also(::println)).also(::println)
m.writeValueAsString(B("cow").also(::println)).also(::println)
m.writeValueAsString(C("cow").also(::println)).also(::println)
The output shows that the fields with short first word in the camel-case are being lowercased
I currently don't have an issue with this but it stumped me for a while because some of my Apache Camel routes started failing. I fixed it simply by using longer first names and it just works as expected.
Please let me know if I should try some other version. This is very easy to test as all I have to do is spin up a scratch (IntelliJ/IDEA) file and run it.
The text was updated successfully, but these errors were encountered:
Chances are this is due to Kotlin module's special handling of names, attempting to follow deviations Kotlin has from Java Beans specification (and sometimes from field-first aspect). So will transfer to Kotlin module; may be moved back if reproducible with plain Java test.
The issue of property names in the serialization result differing from the definition in Kotlin will be addressed in #630.
This issue be closed as a duplicate.
I don't know if this is a feature or a bug but a quick search didn't return anything (or I didn't see it), or if this is something that only happens for Kotlin users.
I am using 2.12.4 but just in case, my POM has
The following may be run in a
scratch.kt
The output shows that the fields with short first word in the camel-case are being lowercased
I currently don't have an issue with this but it stumped me for a while because some of my Apache Camel routes started failing. I fixed it simply by using longer first names and it just works as expected.
Please let me know if I should try some other version. This is very easy to test as all I have to do is spin up a scratch (IntelliJ/IDEA) file and run it.
The text was updated successfully, but these errors were encountered: