another option you have a bad
ObjectMapper
configuration, how are you creating it
@ursus? if you have something like
@Bean
fun objectMapper() = ObjectMapper()
you should amend that; my personal preference is to configure the mapper spring already creates for you, if you prefer to create a new one ensure kotlin module is configured
@Bean
fun objectMapper() = ObjectMapper().findAndRegisterModule()
/* or, but I prefer the above one since jackson will scan your classpath and is smart to configure what it needs
@Bean
fun objectMapper() = jacksonObjectMapper() //this is a kotlin extension funtion
*/
with a "correct" object mapper,
isImportant
and
isNew
work as you expect