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
Describe the bug
When an object has properties named foo and isFoo then the serialization gets the properties and values mixed up.
Version information
2.12.7
To Reproduce
// Kotlin code:
data class FlatRateClass(val isFlatRate: Boolean, val flatRate: Double)
val testObject = FlatRateClass(true, 23.75)
val actual = jacksonObjectMapper().writeValueAsString(testObject)
Expected behavior
I would like actual to be {"isFlatRate":true,"flatRate":23.75}
But actual is {"isFlatRate":23.75}. This mixes the name of the boolean property with the value of the Double property.
Additional context
I tried a number of annotations, using JsonProperty and ignoring isGetter fields, but could not make any serialization that would round-trip from object to string and back.
The text was updated successfully, but these errors were encountered:
Describe the bug
When an object has properties named foo and isFoo then the serialization gets the properties and values mixed up.
Version information
2.12.7
To Reproduce
// Kotlin code:
Expected behavior
I would like actual to be {"isFlatRate":true,"flatRate":23.75}
But actual is {"isFlatRate":23.75}. This mixes the name of the boolean property with the value of the Double property.
Additional context
I tried a number of annotations, using JsonProperty and ignoring isGetter fields, but could not make any serialization that would round-trip from object to string and back.
The text was updated successfully, but these errors were encountered: