In our code we currently use the Jackson @JsonFormat
annotation on a date object as follows:
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssZZ")
private Date startDate;
Is there a class which defines constants for these patterns in order to avoid having such hardcoded value? Something like:
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateTimePatterns.ISO_DATETIME_TIMEZONE)
private Date startDate;
Or should I just create my own constants-class?