You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling the objectMapper's writeValueAsString and passing a Kotlin data class to the function, any of the variables that begin with "is" such as "isDayTime" and that is a string type, do not retain its values after serialization. This was observed after using the serialized body in a GET request to a private API where the API threw an error due to missing required parameters. This does work though if the variable is a boolean.
To Reproduce
Create a Kotlin data class with at least one variable of String type, starting with "is"
Create an instance of the data class and an instance of the Jackson Object Mapper
Serialize the data and pass to an API. API should come back with some error if the value is required.
Expected behavior
The objectMapper would serialize the data class as expected and would retain the value, regardless of the naming convention of a variable.