I’m having an issue with spring boot and serializa...
# spring
k
I’m having an issue with spring boot and serialization with kotlinx-datetime. for an Instant it will use the correct KSerializer class and deserialize “2023-09-30T172106.219Z”, however when it goes to serialize the Instant it outputs
Copy code
{
  "epochSeconds": 1696094517,
  "value$kotlinx_datetime": "2023-09-30T17:21:57Z",
  "nanosecondsOfSecond": 0
}
any ideas as to why it wouldn’t be using the correct serializer? I think it’s switching back to jackson for serialization
yep, it’s definitely jumping back to jackson for serialization and some of my dependencies rely on jackson so I can’t take it off the classpath. any ideas?
h
I think there is a Jackson-Kotlin library you have to put on your classpath.
Copy code
<dependency>
    <groupId>com.fasterxml.jackson.module</groupId>
    <artifactId>jackson-module-kotlin</artifactId>
    <version>2.9.8</version>
</dependency>
Check for latest version