-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Currently, when you serialize the JSON with JsonSerializer.class, it converts the JSR 310 time types to their internal fields. If you add one dependency and configure the serializer, it will allow you to write the JSR 310 types DateTime, LocalDate, and LocalTime out as their appropriate ISO8601 representations.
The needed dependency is
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>{Current Version}</version>
</dependency>
The serializer feature that you will need to add is
new ObjectMapper()
.registerModule(new JavaTimeModule());
DubravskiySergey