Open IceBlizz6 opened 5 months ago
Confirmed.
The KotlinModule
does not currently assume deserialization using setter
, which seems to be a missing feature.
https://github.com/FasterXML/jackson-module-kotlin/blob/c0457486720ffa4318e5d8acd63e758e160cf24b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinNamesAnnotationIntrospector.kt#L66-L71
Since implementation is undecided, please use a workaround such as JsonProperty
.
Thank you for your response.
Is there hope for a real solution on this in the future? (other than the workaround)
I am also curious if this feature could be released for some day.
At least I don't have time to work on it.
Search before asking
Describe the bug
Jackson will not call property setter for boolean properties if the name is prefixed with isX. Value is still assigned, which makes me suspect that it is assigning value to the backing field directly instead.
To Reproduce
Expected behavior
When running the reproduction case then the test should succeed. The setter of isAlive property should be called.
Versions
Kotlin: 1.9.23 Jackson-module-kotlin: 2.17.1
Additional context
No response