Java 8 date/time type not supported

Suppose you want to serialize some object to JSON. You may encounter the exception: We need to do two steps: Firstly, let’s add dependency from https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jsr310. Next, let’s register JavaTimeModule within ObjectMapper: If you working with Spring or with some other framework, ObjectMapper can be instantiated implicitly. You need to override instantiation by yourself. For […]

READ MORE