Package: groovy.json

## [Java] Enum JsonDateHandling

- groovy.json.JsonDateHandling

-     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.

  Since:
    6.0.0

- - ### Enum Constants Summary

    Enum constants classes
    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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Enum Constant Detail

    - #### JsonDateHandling INSTANT

      Convert to a Instant, which like Date is a point on the timeline and so does not preserve an offset in the source.

    - #### JsonDateHandling OFFSET_DATE_TIME

      Convert to a OffsetDateTime, the only choice here that keeps the offset the document carried.

    - #### JsonDateHandling STRING

      Leave it as a `String`, as it appears in the document.

    - #### JsonDateHandling UTIL_DATE

      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.