I\'m trying to deserialize an ISO8601 formatted date into Java8 java.time.Instant
using Jackson. I registered JavaTimeModule with the ObjectMapper, and turned off t
In Jackson 2.9.8 (current one as I'm writing this) it's better to use Instant instead of Date.
You have to add a dependency:
com.fasterxml.jackson.datatype
jackson-datatype-jsr310
2.9.8
Also, register the module and configure SerializationFeature.WRITE_DATES_AS_TIMESTAMPS to false.
new ObjectMapper()
.findAndRegisterModules()
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
More information about Jackson for Java8 here: https://github.com/FasterXML/jackson-modules-java8