I am trying to serialize a joda LocalDate to a string.
@JsonProperty("date")
@JsonSerialize(using = LocalDateSerializer.class)
LocalDate date;
However, that is getting three values like [2020, 1, 9] rather than a string "2020-01-09".
The LocateDateSerializer class documents multiple constructors, one with no arguments, and two like
LocalDateSerializer(java.time.format.DateTimeFormatter formatter)
But I cannot figure out how to specify the constructor argument in the annotation so that I can invoke the LocalDateSerializer with a DateTimeFormatter argument.
Does someone know how to do that?