| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final Boolean | _adjustToContextTZOverride
Flag for |
| protected final Boolean | _readTimestampsAsNanosOverride
Flag for |
| protected final BiFunction | |
| private static final boolean | |
| private static final boolean | |
| protected final Function | |
| protected final Function | |
| public static final InstantDeserializer | |
| protected static final Pattern | ISO8601_COLONLESS_OFFSET_REGEX
Constants used to check if ISO 8601 time string is colon-less. |
| public static final InstantDeserializer | |
| protected final Function | |
| protected final boolean | replaceZeroOffsetAsZ
In case of vanilla `Instant` we seem to need to translate "+0000 | +00:00 | +00" timezone designator into plain "Z" for some reason; see [jackson-modules-java8#18] for more info |
| public static final InstantDeserializer |
| Access | Constructor and Description |
|---|---|
| protected | InstantDeserializer(Class<T> supportedType, DateTimeFormatter formatter, Function<TemporalAccessor, T> parsedToValue, Function<InstantDeserializer.
|
| protected | |
| protected | |
| protected | |
| protected | InstantDeserializer(InstantDeserializer<T> base, Boolean leniency, DateTimeFormatter formatter, JsonFormat.
|
| Modifier and Type | Method and Description |
|---|---|
| protected int | |
| protected T | |
| protected T | |
| protected T | |
| protected JSR310DateTimeDeserializerBase | _withFormatOverrides(DeserializationContext ctxt, BeanProperty property, JsonFormat.
Overrides tools.
|
| private static String | |
| private static OffsetDateTime | |
| public T | deserialize(JsonParser p, DeserializationContext ctxt)
Implements abstract tools. Method that can be called to ask implementation to deserialize JSON content into the value type this serializer handles. |
| private ZoneId | |
| private static String | |
| private String | |
| protected boolean | |
| protected boolean | |
| protected InstantDeserializer | |
| protected InstantDeserializer | withLeniency(Boolean leniency)
Implements abstract tools.
|
| _adjustToContextTZOverride | back to summary |
|---|---|
| protected final Boolean _adjustToContextTZOverride Flag for | |
| _readTimestampsAsNanosOverride | back to summary |
|---|---|
| protected final Boolean _readTimestampsAsNanosOverride Flag for | |
| adjust | back to summary |
|---|---|
| protected final BiFunction<T, ZoneId, T> adjust | |
| DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS | back to summary |
|---|---|
| private static final boolean DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS | |
| DEFAULT_NORMALIZE_ZONE_ID | back to summary |
|---|---|
| private static final boolean DEFAULT_NORMALIZE_ZONE_ID | |
| fromMilliseconds | back to summary |
|---|---|
| protected final Function<InstantDeserializer. | |
| fromNanoseconds | back to summary |
|---|---|
| protected final Function<InstantDeserializer. | |
| INSTANT | back to summary |
|---|---|
| public static final InstantDeserializer<Instant> INSTANT | |
| ISO8601_COLONLESS_OFFSET_REGEX | back to summary |
|---|---|
| protected static final Pattern ISO8601_COLONLESS_OFFSET_REGEX Constants used to check if ISO 8601 time string is colon-less. See [jackson-modules-java8#131] | |
| OFFSET_DATE_TIME | back to summary |
|---|---|
| public static final InstantDeserializer<OffsetDateTime> OFFSET_DATE_TIME | |
| parsedToValue | back to summary |
|---|---|
| protected final Function<TemporalAccessor, T> parsedToValue | |
| replaceZeroOffsetAsZ | back to summary |
|---|---|
| protected final boolean replaceZeroOffsetAsZ In case of vanilla `Instant` we seem to need to translate "+0000 | +00:00 | +00" timezone designator into plain "Z" for some reason; see [jackson-modules-java8#18] for more info | |
| ZONED_DATE_TIME | back to summary |
|---|---|
| public static final InstantDeserializer<ZonedDateTime> ZONED_DATE_TIME | |
| InstantDeserializer | back to summary |
|---|---|
protected InstantDeserializer(Class<T> supportedType, DateTimeFormatter formatter, Function<TemporalAccessor, T> parsedToValue, Function<InstantDeserializer.
| |
| InstantDeserializer | back to summary |
|---|---|
protected InstantDeserializer(InstantDeserializer<T> base, DateTimeFormatter f)
| |
| InstantDeserializer | back to summary |
|---|---|
protected InstantDeserializer(InstantDeserializer<T> base, Boolean adjustToContextTimezoneOverride)
| |
| InstantDeserializer | back to summary |
|---|---|
protected InstantDeserializer(InstantDeserializer<T> base, DateTimeFormatter f, Boolean leniency)
| |
| InstantDeserializer | back to summary |
|---|---|
| protected InstantDeserializer(InstantDeserializer<T> base, Boolean leniency, DateTimeFormatter formatter, JsonFormat. | |
| _countPeriods | back to summary |
|---|---|
| protected int _countPeriods(String str) | |
| _fromDecimal | back to summary |
|---|---|
| protected T _fromDecimal(DeserializationContext context, BigDecimal value) | |
| _fromLong | back to summary |
|---|---|
| protected T _fromLong(DeserializationContext context, long timestamp) | |
| _fromString | back to summary |
|---|---|
| protected T _fromString(JsonParser p, DeserializationContext ctxt, String string0) throws JacksonException | |
| _withFormatOverrides | back to summary |
|---|---|
| protected JSR310DateTimeDeserializerBase Overrides tools.
| |
| addInColonToOffsetIfMissing | back to summary |
|---|---|
| private static String addInColonToOffsetIfMissing(String text) | |
| decimalToOffsetDateTime | back to summary |
|---|---|
| private static OffsetDateTime decimalToOffsetDateTime(InstantDeserializer. | |
| deserialize | back to summary |
|---|---|
| public T deserialize(JsonParser p, DeserializationContext ctxt) throws JacksonException Implements abstract tools. Doc from tools. Method that can be called to ask implementation to deserialize JSON content into the value type this serializer handles. Returned instance is to be constructed by method itself. Pre-condition for this method is that the parser points to the first event that is part of value to deserializer (and which is never JSON 'null' literal, more on this below): for simple types it may be the only value; and for structured types the Object start marker or a FIELD_NAME. The two possible input conditions for structured types result from polymorphism via fields. In the ordinary case, Jackson calls this method when it has encountered an OBJECT_START, and the method implementation must advance to the next token to see the first field name. If the application configures polymorphism via a field, then the object looks like the following.
{
"@class": "class name",
...
}
Jackson consumes the two tokens (the @class field name
and its value) in order to learn the class and select the deserializer.
Thus, the stream is pointing to the FIELD_NAME for the first field
after the @class. Thus, if you want your method to work correctly
both with and without polymorphism, you must begin your method with:
if (p.currentToken() == JsonToken.START_OBJECT) {
p.nextToken();
}
This results in the stream pointing to the field name, so that
the two conditions align.
Post-condition is that the parser will point to the last event that is part of deserialized value (or in case deserialization fails, event that was not recognized or usable, which may be the same event as the one it pointed to upon call).
Handling null values (JsonToken.VALUE_NULL)
| |
| getZone | back to summary |
|---|---|
| private ZoneId getZone(DeserializationContext context) | |
| replaceZeroOffsetAsZ | back to summary |
|---|---|
| private static String replaceZeroOffsetAsZ(String text) | |
| replaceZeroOffsetAsZIfNecessary | back to summary |
|---|---|
| private String replaceZeroOffsetAsZIfNecessary(String text) | |
| shouldAdjustToContextTimezone | back to summary |
|---|---|
| protected boolean shouldAdjustToContextTimezone(DeserializationContext context) | |
| shouldReadTimestampsAsNanoseconds | back to summary |
|---|---|
| protected boolean shouldReadTimestampsAsNanoseconds(DeserializationContext context) | |
| withDateFormat | back to summary |
|---|---|
| protected InstantDeserializer Implements abstract tools.
| |
| withLeniency | back to summary |
|---|---|
| protected InstantDeserializer Implements abstract tools.
| |
| Modifier and Type | Field and Description |
|---|---|
| public final int | |
| public final long | |
| public final ZoneId |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| fraction | back to summary |
|---|---|
| public final int fraction | |
| integer | back to summary |
|---|---|
| public final long integer | |
| zoneId | back to summary |
|---|---|
| public final ZoneId zoneId | |
| FromDecimalArguments | back to summary |
|---|---|
| pack-priv FromDecimalArguments(long integer, int fraction, ZoneId zoneId) | |
| Modifier and Type | Field and Description |
|---|---|
| public final long | |
| public final ZoneId |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| value | back to summary |
|---|---|
| public final long value | |
| zoneId | back to summary |
|---|---|
| public final ZoneId zoneId | |
| FromIntegerArguments | back to summary |
|---|---|
| pack-priv FromIntegerArguments(long value, ZoneId zoneId) | |