I have serialised the data class model "ProfileInfo" using
val jsonString = jacksonObjectMapper().setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE).writeValueAsString(profileInfo)
but when I deserialise the jsonString into data class model using
val profileInfo: ProfileInfo = jacksonObjectMapper().readValue<ProfileInfo>(jsonString)
only the fields without underscores receiving the value. other fields with underscores assigned as null. Could anybody help me about how to deserialise using Jackson object mapper.