In a DTO, I can get a date string converted to a java.util.Date
, using the com.fasterxml.jackson.annotation.JsonFormat
annotation:
class myDTO {
@JsonFormat(pattern="MM/dd/yyyy")
private Date theDate;
// accessors, etc...
}
Not so when the property is of type java.util.LocalDate
...
How do I make it work?
Using jackson-databind-2.4.1
Thanks!