public enum JsonDateHandling
What a slurper makes of a string in a full ISO-8601 or JSON-date form.
This applies to JsonParserType.INDEX_OVERLAY and JsonParserType.LAX.
The other two parser types have no date handling and return the string whatever is
chosen here. A date carrying no time, such as "2026-09-04", is left as a
String by every parser type.
| Enum constant | Description |
|---|---|
INSTANT |
Convert to a Instant, which like Date is a point on the timeline and so does not preserve an offset in the source. |
OFFSET_DATE_TIME |
Convert to a OffsetDateTime, the only choice here that keeps the offset the document carried. |
STRING |
Leave it as a String, as it appears in the document. |
UTIL_DATE |
Convert to a Date. |
Convert to a Instant, which like Date is a point on the timeline and so does not preserve an offset in the source.
Convert to a OffsetDateTime, the only choice here that keeps the offset the document carried.
Leave it as a String, as it appears in the document.
Convert to a Date. This is the default, and what a slurper has
always done. A Date is an instant, so an offset in the source is not
preserved.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.