diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/config/JsonMapperConfig.java b/apps/dolly-backend/src/main/java/no/nav/dolly/config/JsonMapperConfig.java index ab13b6f8be..a8eb426cdd 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/config/JsonMapperConfig.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/config/JsonMapperConfig.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.json.JsonMapper; import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; import com.fasterxml.jackson.datatype.jsr310.ser.YearMonthSerializer; @@ -45,12 +46,14 @@ public ObjectMapper objectMapper() { .addSerializer(ZonedDateTime.class, new ZonedDateTimeSerializer(DateTimeFormatter.ISO_DATE_TIME)); return JsonMapper .builder() + .configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false) .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) .configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true) .configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true) .enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS) .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS) .build() + .registerModule(new JavaTimeModule()) .registerModule(simpleModule); }