@JsonFormat: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 9: Line 9:
To format Date objects in bulk at ObjectMapper level, use a DateFormat on the ObjectMapper, as described here: {{Internal|Jackson_ObjectMapper#Specifying_a_Date_Format|Specifying a Date Format at ObjectMapper Level}}
To format Date objects in bulk at ObjectMapper level, use a DateFormat on the ObjectMapper, as described here: {{Internal|Jackson_ObjectMapper#Specifying_a_Date_Format|Specifying a Date Format at ObjectMapper Level}}


Example:
Playground Example:


{{External|[https://github.com/ovidiuf/playground/tree/master/json/jackson/annotations/%40JsonFormat-for-Dates Playground @JsonFormat for Date Example]}}
{{External|[https://github.com/ovidiuf/playground/tree/master/json/jackson/annotations/%40JsonFormat-for-Dates Playground @JsonFormat for Date Example]}}

Revision as of 05:01, 14 November 2018

Internal

Overview

Formatting Date

To format Date objects in bulk at ObjectMapper level, use a DateFormat on the ObjectMapper, as described here:

Specifying a Date Format at ObjectMapper Level

Playground Example:

Playground @JsonFormat for Date Example