public class InstantDeserializer<T extends Temporal> extends JSR310DateTimeDeserializerBase<T>
Modifier and Type | Field and Description |
---|---|
protected BiFunction<T,ZoneId,T> |
adjust |
protected Function<com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer.FromIntegerArguments,T> |
fromMilliseconds |
protected Function<com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer.FromDecimalArguments,T> |
fromNanoseconds |
static InstantDeserializer<Instant> |
INSTANT |
static InstantDeserializer<OffsetDateTime> |
OFFSET_DATE_TIME |
protected Function<TemporalAccessor,T> |
parsedToValue |
protected boolean |
replace0000AsZ
In case of vanilla `Instant` we seem to need to translate "+0000"
timezone designator into plain "Z" for some reason; see
[datatype-jsr310#79] for more info
|
static InstantDeserializer<ZonedDateTime> |
ZONED_DATE_TIME |
_formatter
Modifier | Constructor and Description |
---|---|
protected |
InstantDeserializer(Class<T> supportedType,
DateTimeFormatter formatter,
Function<TemporalAccessor,T> parsedToValue,
Function<com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer.FromIntegerArguments,T> fromMilliseconds,
Function<com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer.FromDecimalArguments,T> fromNanoseconds,
BiFunction<T,ZoneId,T> adjust,
boolean replace0000AsZ) |
protected |
InstantDeserializer(InstantDeserializer<T> base,
DateTimeFormatter f) |
Modifier and Type | Method and Description |
---|---|
protected int |
_countPeriods(String str)
Helper method to find Strings of form "all digits" and "digits-comma-digits"
|
protected T |
_fromDecimal(com.fasterxml.jackson.databind.DeserializationContext context,
BigDecimal value) |
protected T |
_fromLong(com.fasterxml.jackson.databind.DeserializationContext context,
long timestamp) |
protected DateTimeException |
_peelDTE(DateTimeException e)
Helper method used to peel off spurious wrappings of DateTimeException
|
protected <BOGUS> BOGUS |
_reportWrongToken(com.fasterxml.jackson.core.JsonParser parser,
com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonToken... expTypes) |
protected <BOGUS> BOGUS |
_reportWrongToken(com.fasterxml.jackson.core.JsonParser parser,
com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonToken exp,
String unit) |
protected <BOGUS> BOGUS |
_rethrowDateTimeException(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext context,
DateTimeException e0,
String value) |
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 com.fasterxml.jackson.databind.JsonDeserializer<T> |
withDateFormat(DateTimeFormatter dtf) |
createContextual
_coerceIntegral, _deserializeFromEmpty, _failDoubleToIntCoercion, _hasTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _parseBoolean, _parseBooleanFromOther, _parseBooleanPrimitive, _parseByte, _parseDate, _parseDouble, _parseDoublePrimitive, _parseFloat, _parseFloatPrimitive, _parseInteger, _parseIntPrimitive, _parseLong, _parseLongPrimitive, _parseShort, _parseShortPrimitive, _parseString, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, getValueClass, getValueType, handledType, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
public static final InstantDeserializer<Instant> INSTANT
public static final InstantDeserializer<OffsetDateTime> OFFSET_DATE_TIME
public static final InstantDeserializer<ZonedDateTime> ZONED_DATE_TIME
protected final Function<com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer.FromIntegerArguments,T extends Temporal> fromMilliseconds
protected final Function<com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer.FromDecimalArguments,T extends Temporal> fromNanoseconds
protected final Function<TemporalAccessor,T extends Temporal> parsedToValue
protected final boolean replace0000AsZ
protected InstantDeserializer(Class<T> supportedType, DateTimeFormatter formatter, Function<TemporalAccessor,T> parsedToValue, Function<com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer.FromIntegerArguments,T> fromMilliseconds, Function<com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer.FromDecimalArguments,T> fromNanoseconds, BiFunction<T,ZoneId,T> adjust, boolean replace0000AsZ)
protected InstantDeserializer(InstantDeserializer<T> base, DateTimeFormatter f)
protected com.fasterxml.jackson.databind.JsonDeserializer<T> withDateFormat(DateTimeFormatter dtf)
withDateFormat
in class JSR310DateTimeDeserializerBase<T extends 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 Temporal>
IOException
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>
IOException
protected <BOGUS> BOGUS _reportWrongToken(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.core.JsonToken exp, String unit) throws IOException
IOException
protected <BOGUS> BOGUS _reportWrongToken(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.core.JsonToken... expTypes) throws IOException
IOException
protected <BOGUS> BOGUS _rethrowDateTimeException(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext context, DateTimeException e0, String value) throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingException
protected DateTimeException _peelDTE(DateTimeException e)
e
- DateTimeException to peelDateTimeException
- that does not have another DateTimeException as its cause.Copyright © 2017 FasterXML. All rights reserved.