Is anyone else also in love with the fact that jac...
# announcements
g
Is anyone else also in love with the fact that jackson-module-kotlin latest version doesn't strip out
is
prefixes from boolean when serializing into response body json like
val isValid = true => {"isValid": true}
while Spring latest version requires that
is
prefix is not included when deserializing from request parameters like
?valid=true => val isValid = true
yet
?ssValid=true
fails to map? So I either have to mark every boolean in a 20k commit history enterprise project which is linked with a Rest controller like
@JsonProperty("valid")
or change the structure so that when consuming my REST api they have to live with "isFoo" boolean naming while when they send back the request to me they have to change the name like "foo" instead in their request bodies. Absolute bonkers I'm beginning to think maybe using
is
prefix in kotlin is simply a horrible idea that I should always stay away from. It causes way too many compatibility issues and headaches due to the compiled java source treating it as
foo
with
isFoo()
getter.
d
You might be able to use a custom property naming strategy
☝️ 1