3

I have a case class:

case class Stuff(createdOn: Instant)

and I'm using json4s with Jackson to provide my JSON serialization/deserialization. However, I'm not able to serialize/deserialize createdOn properly.

If I was using plain Jackson, https://github.com/FasterXML/jackson-datatype-jsr310 would be great. However, when using json4s, even if I register the JSR310 module using

org.json4s.jackson.JsonMethods.mapper.registerModule(new JavaTimeModule())

I'm still unable to get my Instant right.

Am I missing something?

manub
  • 3,990
  • 2
  • 24
  • 33

0 Answers0