serialize/deserialize java 8 java.time with Jackson JSON mapper

How do I use Jackson JSON mapper with Java 8 LocalDateTime?

org.codehaus.jackson.map.JsonMappingException: Can not instantiate value of type [simple type, class java.time.LocalDateTime] from JSON String; no single-String constructor/factory method (through reference chain: MyDTO[“field1”]->SubDTO[“date”])

23 Answers
23

Leave a Comment