Serialize LocalDate and LocalDateTime as Unix timestamps
I'm moving from using java.sql.Timestamp and java.util.GregorianCalendar to employ java.time.* new classes in a Spring MVC application. So I changed every private GregorianCalendar field; to private LocalDate field; or private LocalDateTime field; But now when serializing those beans, they get serialized like this: "field": { "year": 1970, "month": "JANUARY", "dayOfMonth": 18, "dayOfWeek": "SUNDAY", "era": "CE", "dayOfYear": 18, "leapYear": false, "monthValue": 1, "chronology": { "id": "ISO", "calendarType": "iso8601" } }, I found answers to other questions that mention to add a dependency to