- All Implemented Interfaces:
- com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
public class JsonDateSerializer
extends com.fasterxml.jackson.databind.JsonSerializer<java.util.Date>
Apparently there is no standard format for dates in JSON. JsonLib (which
this portlet previously used) essentially serialized an instance of
java.util.Date like any other object. Jackson, however, (the
current method) converts the date to "epoch time" (a long representing
milliseconds since January 1, 1970, 00:00:00 GMT). The Jackson approach
isn't that useful, since it becomes hard to detect what is a date. This
class is responsible for telling Jackson to use the former method.