https://kotlinlang.org logo
#jackson-kotlin
Title
# jackson-kotlin
r

rrader

05/14/2018, 11:33 AM
class User(val name: String, val isAdmin: Boolean)
it is serialialized in object with "admin" property, but not "is_admin", is this a bug?
d

diesieben07

05/14/2018, 11:36 AM
Not related to Kotlin, this is how Jackson names properties. It strips the "getter prefix", which is
get
normally and
is
for boolean properties. So with
isEnabled
as a getter you will get
enabled
as property.
r

rrader

05/14/2018, 11:42 AM
but getter is generated by Kotlin, so it is Kotlin related
d

diesieben07

05/14/2018, 11:42 AM
Yes, but Kotlin just follows Java conventions here.