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
A bug in which the name of the getter function is not generated as intended when compiling Kotlin due to the use of the field name as a getter function during serialization in Jackson, so that the field name conversion such as snake case is not converted to the desired format
Kotlin code example:
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy::class)
data classABC (
valaBcDef:String,
)
internalclassObjectMapperTest {
val mapper =ObjectMapper()
@Test
fun`test abc`() {
val abc =ABC("John")
println(mapper.writeValueAsString(abc))
}
}
When the above code is executed, the aBcDef field should be converted to the a_bc_def field, but it is actually converted to abc_def
Result:
{"abc_def":"John"}
Kotlin Version : 1.9.0
Jackson Databind Version: 2.15.2
Jackson Module Kotlin Version: 2.15.2
The text was updated successfully, but these errors were encountered:
A bug in which the name of the getter function is not generated as intended when compiling Kotlin due to the use of the field name as a getter function during serialization in Jackson, so that the field name conversion such as snake case is not converted to the desired format
Kotlin code example:
When the above code is executed, the aBcDef field should be converted to the
a_bc_def
field, but it is actually converted toabc_def
Result:
Kotlin Version : 1.9.0
Jackson Databind Version: 2.15.2
Jackson Module Kotlin Version: 2.15.2
The text was updated successfully, but these errors were encountered: