public class InstantDeserializer<T extends org.threeten.bp.temporal.Temporal> extends ThreeTenDateTimeDeserializerBase<T>
Instants, OffsetDateTime, and ZonedDateTimes.| Modifier and Type | Class and Description |
|---|---|
static class |
InstantDeserializer.FromDecimalArguments |
static class |
InstantDeserializer.FromIntegerArguments |
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
_adjustToContextTZOverride
Flag for
JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE |
protected BiFunction<T,org.threeten.bp.ZoneId,T> |
adjust |
protected Function<InstantDeserializer.FromIntegerArguments,T> |
fromMilliseconds |
protected Function<InstantDeserializer.FromDecimalArguments,T> |
fromNanoseconds |
static InstantDeserializer<org.threeten.bp.Instant> |
INSTANT |
static InstantDeserializer<org.threeten.bp.OffsetDateTime> |
OFFSET_DATE_TIME |
protected Function<org.threeten.bp.temporal.TemporalAccessor,T> |
parsedToValue |
protected 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
|
static InstantDeserializer<org.threeten.bp.ZonedDateTime> |
ZONED_DATE_TIME |
_formatter, _isLenient| Modifier | Constructor and Description |
|---|---|
protected |
InstantDeserializer(Class<T> supportedType,
org.threeten.bp.format.DateTimeFormatter formatter,
Function<org.threeten.bp.temporal.TemporalAccessor,T> parsedToValue,
Function<InstantDeserializer.FromIntegerArguments,T> fromMilliseconds,
Function<InstantDeserializer.FromDecimalArguments,T> fromNanoseconds,
BiFunction<T,org.threeten.bp.ZoneId,T> adjust,
boolean replaceZeroOffsetAsZ) |
protected |
InstantDeserializer(InstantDeserializer<T> base,
Boolean adjustToContextTimezoneOverride) |
protected |
InstantDeserializer(InstantDeserializer<T> base,
org.threeten.bp.format.DateTimeFormatter f) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
_countPeriods(String str) |
protected T |
_fromDecimal(com.fasterxml.jackson.databind.DeserializationContext context,
BigDecimal value) |
protected T |
_fromLong(com.fasterxml.jackson.databind.DeserializationContext context,
long timestamp) |
protected <R> R |
_handleDateTimeException(com.fasterxml.jackson.databind.DeserializationContext context,
org.threeten.bp.DateTimeException e0,
String value) |
protected <R> R |
_handleUnexpectedToken(com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonParser parser,
com.fasterxml.jackson.core.JsonToken... expTypes) |
protected <R> R |
_handleUnexpectedToken(com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonParser parser,
String message,
Object... args) |
protected org.threeten.bp.DateTimeException |
_peelDTE(org.threeten.bp.DateTimeException e)
Helper method used to peel off spurious wrappings of DateTimeException
|
protected <BOGUS> BOGUS |
_reportWrongToken(com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonToken exp,
String unit) |
protected <BOGUS> BOGUS |
_reportWrongToken(com.fasterxml.jackson.core.JsonParser parser,
com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonToken... expTypes) |
com.fasterxml.jackson.databind.JsonDeserializer<T> |
createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt,
com.fasterxml.jackson.databind.BeanProperty property) |
T |
deserialize(com.fasterxml.jackson.core.JsonParser parser,
com.fasterxml.jackson.databind.DeserializationContext context) |
Object |
deserializeWithType(com.fasterxml.jackson.core.JsonParser parser,
com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) |
protected boolean |
shouldAdjustToContextTimezone(com.fasterxml.jackson.databind.DeserializationContext context) |
protected InstantDeserializer<T> |
withDateFormat(org.threeten.bp.format.DateTimeFormatter dtf) |
protected InstantDeserializer<T> |
withLeniency(Boolean leniency) |
_failForNotLenient, _throwNoNumericTimestampNeedTimeZone, isLenientdeserialize, getEmptyAccessPattern, getNullAccessPattern, supportsUpdate_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDoublepublic static final InstantDeserializer<org.threeten.bp.Instant> INSTANT
public static final InstantDeserializer<org.threeten.bp.OffsetDateTime> OFFSET_DATE_TIME
public static final InstantDeserializer<org.threeten.bp.ZonedDateTime> ZONED_DATE_TIME
protected final Function<InstantDeserializer.FromIntegerArguments,T extends org.threeten.bp.temporal.Temporal> fromMilliseconds
protected final Function<InstantDeserializer.FromDecimalArguments,T extends org.threeten.bp.temporal.Temporal> fromNanoseconds
protected final Function<org.threeten.bp.temporal.TemporalAccessor,T extends org.threeten.bp.temporal.Temporal> parsedToValue
protected final BiFunction<T extends org.threeten.bp.temporal.Temporal,org.threeten.bp.ZoneId,T extends org.threeten.bp.temporal.Temporal> adjust
protected final boolean replaceZeroOffsetAsZ
protected final Boolean _adjustToContextTZOverride
JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONEprotected InstantDeserializer(Class<T> supportedType, org.threeten.bp.format.DateTimeFormatter formatter, Function<org.threeten.bp.temporal.TemporalAccessor,T> parsedToValue, Function<InstantDeserializer.FromIntegerArguments,T> fromMilliseconds, Function<InstantDeserializer.FromDecimalArguments,T> fromNanoseconds, BiFunction<T,org.threeten.bp.ZoneId,T> adjust, boolean replaceZeroOffsetAsZ)
protected InstantDeserializer(InstantDeserializer<T> base, org.threeten.bp.format.DateTimeFormatter f)
protected InstantDeserializer(InstantDeserializer<T> base, Boolean adjustToContextTimezoneOverride)
protected InstantDeserializer<T> withDateFormat(org.threeten.bp.format.DateTimeFormatter dtf)
withDateFormat in class ThreeTenDateTimeDeserializerBase<T extends org.threeten.bp.temporal.Temporal>protected InstantDeserializer<T> withLeniency(Boolean leniency)
withLeniency in class ThreeTenDateTimeDeserializerBase<T extends org.threeten.bp.temporal.Temporal>public T deserialize(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext context) throws IOException
deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<T extends org.threeten.bp.temporal.Temporal>IOExceptionpublic com.fasterxml.jackson.databind.JsonDeserializer<T> createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
createContextual in interface com.fasterxml.jackson.databind.deser.ContextualDeserializercreateContextual in class ThreeTenDateTimeDeserializerBase<T extends org.threeten.bp.temporal.Temporal>com.fasterxml.jackson.databind.JsonMappingExceptionprotected boolean shouldAdjustToContextTimezone(com.fasterxml.jackson.databind.DeserializationContext context)
protected int _countPeriods(String str)
protected T _fromLong(com.fasterxml.jackson.databind.DeserializationContext context, long timestamp)
protected T _fromDecimal(com.fasterxml.jackson.databind.DeserializationContext context, BigDecimal value)
public Object deserializeWithType(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) throws IOException
deserializeWithType in class com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<T>IOExceptionprotected <BOGUS> BOGUS _reportWrongToken(com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonToken exp,
String unit)
throws IOException
IOExceptionprotected <BOGUS> BOGUS _reportWrongToken(com.fasterxml.jackson.core.JsonParser parser,
com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonToken... expTypes)
throws IOException
IOExceptionprotected <R> R _handleDateTimeException(com.fasterxml.jackson.databind.DeserializationContext context,
org.threeten.bp.DateTimeException e0,
String value)
throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingExceptionprotected <R> R _handleUnexpectedToken(com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonParser parser,
String message,
Object... args)
throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingExceptionprotected <R> R _handleUnexpectedToken(com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonParser parser,
com.fasterxml.jackson.core.JsonToken... expTypes)
throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingExceptionprotected org.threeten.bp.DateTimeException _peelDTE(org.threeten.bp.DateTimeException e)
e - DateTimeException to peelCopyright © 2019 FasterXML. All rights reserved.