Using custom serializer/deserializer classes, I've figured out how to work with LocalDate, with different formats, and in such a way that none of the client classes have to worry about the specific structure of my JSON DAO's.
But, I haven't been able to figure out how to get from an JSON array of LocalDate to a Java List. A List<String> works great. Not so lucky with List<LocalDate>. Any suggestions?
static public final DateTimeFormatter meetingTitleFormatter = DateTimeFormatter.ofPattern("dd MMMM yyyy");
static public final DateTimeFormatter meetingIDFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
static public final DateTimeFormatter meetingDateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
static public final DateTimeFormatter meetingShortDateFormatter = DateTimeFormatter.ofPattern("yyyy MMM dd");
static public final DateTimeFormatter meetingLongDateFormatter = DateTimeFormatter.ofPattern("yyyy MMMM dd");
@JsonProperty("StringDates")
private List<LocalDate> PossibleMeetingDates = new ArrayList<>();
@JsonDeserialize(using = MeetingShortDateDeserializer.class)
@JsonSerialize(using = MeetingShortDateSerializer.class)
@JsonProperty("MeetingShortDate")
private LocalDate meetingShortDate;
@JsonDeserialize(using = MeetingIDDeserializer.class)
@JsonSerialize(using = MeetingIDSerializer.class)
@JsonProperty("MeetingID")
private LocalDate meetingID;
@JsonDeserialize(using = MeetingDateDeserializer.class)
@JsonSerialize(using = MeetingDateSerializer.class)
@JsonProperty("MeetingDate")
private LocalDate meetingDate;
@JsonDeserialize(using = MeetingTitleDeserializer.class)
@JsonSerialize(using = MeetingTitleSerializer.class)
@JsonProperty("MeetingTitle")
private LocalDate meetingTitle;