I'm trying to serialize an Object that contains a List of Dates and i want to serialize to a JSON list of dates (String) in a specific format (yyyy-MM-dd).
private List<Date> executionDates;
will become like:
"executionDates": [
"2016-07-22",
"2016-07-23",
"2016-07-24"
]
It is possible to do it with annotations?
Thanks in advance.
@JsonSerialize(using = JsonDateSerializer.class)
on getter ofexecutionDates
variable. – Apeldoorn