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
Naming an object attribute beginning with 'is' leads to not being serialised at all. This issue was fixed for booleans: #80
But still exists if we use an object:
import com.fasterxml.jackson.databind.ObjectMapper
data class Model(
val isActive: Boolean,
val isAvailable: EmbeddedModel
)
data class EmbeddedModel(
val value: Boolean,
val metaData: String
)
fun main() {
val model = Model(
isActive = true,
isAvailable = EmbeddedModel(
value = true,
metaData = "someString"
)
)
val objectMapper = ObjectMapper()
println(objectMapper.writeValueAsString(model))
}
prints just {"active":true} It ignores isAvailable completely. This happens with 2.11.4 and 2.12.3. I also created a sample project to demonstrate this issue:
Naming an object attribute beginning with 'is' leads to not being serialised at all. This issue was fixed for booleans: #80
But still exists if we use an object:
prints just
{"active":true}
It ignoresisAvailable
completely. This happens with 2.11.4 and 2.12.3. I also created a sample project to demonstrate this issue:https://github.com/karsunke/jackson-kotlin-boolean
The text was updated successfully, but these errors were encountered: