Top Description Fields Constructors Methods
tools.jackson.databind.ext.javatime.deser

pack-priv abstract Class JSR310DeserializerBase<T>

extends StdScalarDeserializer<T>
Class Inheritance
Known Direct Subclasses
tools.jackson.databind.ext.javatime.deser.JSR310StringParsableDeserializer, tools.jackson.databind.ext.javatime.deser.DurationDeserializer, tools.jackson.databind.ext.javatime.deser.JSR310DateTimeDeserializerBase
Imports
java.time.DateTimeException, java.time.format.DateTimeFormatter, java.util.Arrays, tools.jackson.core.JacksonException, .JsonParser, .JsonToken, tools.jackson.core.io.NumberInput, tools.jackson.databind.*, tools.jackson.databind.cfg.CoercionAction, tools.jackson.databind.deser.std.StdScalarDeserializer, tools.jackson.databind.jsontype.TypeDeserializer, tools.jackson.databind.type.LogicalType, tools.jackson.databind.util.ClassUtil

Base class that indicates that all JSR310 datatypes are deserialized from scalar JSON types.
Author
Nick Williams

Field Summary

Modifier and TypeField and Description
protected final boolean
_isLenient

Flag that indicates what leniency setting is enabled for this deserializer (either due com.fasterxml.jackson.annotation.JsonFormat.Shape annotation on property or class, or due to per-type "config override", or from global settings): leniency/strictness has effect on accepting some non-default input value representations (such as integer values for dates).

Constructor Summary

AccessConstructor and Description
protected
JSR310DeserializerBase(Class<T> supportedType)

protected
JSR310DeserializerBase(Class<T> supportedType, Boolean leniency)

protected
protected

Method Summary

Modifier and TypeMethod and Description
protected T
protected T
_fromEmptyString(JsonParser p, DeserializationContext ctxt, String str)

Replacement for isLenient() for specific case of deserialization from empty or blank String.

protected <R> R
protected <R> R
protected <R> R
protected <R> R
protected boolean
protected DateTimeException

Returns:

DateTimeException that does not have another DateTimeException as its cause.
_peelDTE
(DateTimeException
DateTimeException to peel
e
)

Helper method used to peel off spurious wrappings of DateTimeException

protected <BOGUS> BOGUS
protected <BOGUS> BOGUS
public Object
deserializeWithType(JsonParser parser, DeserializationContext context, TypeDeserializer typeDeserializer)

Overrides tools.jackson.databind.deser.std.StdScalarDeserializer.deserializeWithType.

Base implementation that does not assume specific type inclusion mechanism.

protected boolean

Returns:

true if lenient handling is enabled; {code false} if not (strict mode)
isLenient
()

public LogicalType
logicalType()

Overrides tools.jackson.databind.deser.std.StdScalarDeserializer.logicalType.

Method for accessing logical type of values this deserializer produces.

protected abstract JSR310DeserializerBase<T>
Inherited from tools.jackson.databind.deser.std.StdScalarDeserializer:
deserializegetEmptyAccessPatterngetNullAccessPatternsupportsUpdate

Field Detail

_isLenientback to summary
protected final boolean _isLenient

Flag that indicates what leniency setting is enabled for this deserializer (either due com.fasterxml.jackson.annotation.JsonFormat.Shape annotation on property or class, or due to per-type "config override", or from global settings): leniency/strictness has effect on accepting some non-default input value representations (such as integer values for dates).

Note that global default setting is for leniency to be enabled, for Jackson 2.x, and has to be explicitly change to force strict handling: this is to keep backwards compatibility with earlier versions.

Constructor Detail

JSR310DeserializerBaseback to summary
protected JSR310DeserializerBase(Class<T> supportedType)
JSR310DeserializerBaseback to summary
protected JSR310DeserializerBase(Class<T> supportedType, Boolean leniency)
JSR310DeserializerBaseback to summary
protected JSR310DeserializerBase(JSR310DeserializerBase<T> base)
JSR310DeserializerBaseback to summary
protected JSR310DeserializerBase(JSR310DeserializerBase<T> base, Boolean leniency)

Method Detail

_failForNotLenientback to summary
protected T _failForNotLenient(JsonParser p, DeserializationContext ctxt, JsonToken expToken) throws JacksonException
Annotations
@SuppressWarnings:unchecked
_fromEmptyStringback to summary
protected T _fromEmptyString(JsonParser p, DeserializationContext ctxt, String str) throws JacksonException

Replacement for isLenient() for specific case of deserialization from empty or blank String.

Annotations
@SuppressWarnings:unchecked
Since
2.12
_handleDateTimeExceptionback to summary
protected <R> R _handleDateTimeException(DeserializationContext context, DateTimeException e0, String value) throws JacksonException
Annotations
@SuppressWarnings:unchecked
_handleDateTimeFormatExceptionback to summary
protected <R> R _handleDateTimeFormatException(DeserializationContext context, DateTimeException e0, DateTimeFormatter format, String value) throws JacksonException
Annotations
@SuppressWarnings:unchecked
_handleUnexpectedTokenback to summary
protected <R> R _handleUnexpectedToken(DeserializationContext ctxt, JsonParser parser, String message, Object... args)
Annotations
@SuppressWarnings:unchecked
_handleUnexpectedTokenback to summary
protected <R> R _handleUnexpectedToken(DeserializationContext context, JsonParser parser, JsonToken... expTypes)
_isValidTimestampStringback to summary
protected boolean _isValidTimestampString(String str)
_peelDTEback to summary
protected DateTimeException _peelDTE(DateTimeException e)

Helper method used to peel off spurious wrappings of DateTimeException

Parameters
e:DateTimeException

DateTimeException to peel

Returns:DateTimeException

DateTimeException that does not have another DateTimeException as its cause.

_reportWrongTokenback to summary
protected <BOGUS> BOGUS _reportWrongToken(DeserializationContext context, JsonToken exp, String unit) throws JacksonException
_reportWrongTokenback to summary
protected <BOGUS> BOGUS _reportWrongToken(JsonParser parser, DeserializationContext context, JsonToken... expTypes) throws JacksonException
deserializeWithTypeback to summary
public Object deserializeWithType(JsonParser parser, DeserializationContext context, TypeDeserializer typeDeserializer) throws JacksonException

Overrides tools.jackson.databind.deser.std.StdScalarDeserializer.deserializeWithType.

Doc from tools.jackson.databind.deser.std.StdDeserializer.deserializeWithType.

Base implementation that does not assume specific type inclusion mechanism. Sub-classes are expected to override this method if they are to handle type information.

Annotations
@Override
isLenientback to summary
protected boolean isLenient()
Returns:boolean

true if lenient handling is enabled; {code false} if not (strict mode)

logicalTypeback to summary
public LogicalType logicalType()

Overrides tools.jackson.databind.deser.std.StdScalarDeserializer.logicalType.

Doc from tools.jackson.databind.ValueDeserializer.logicalType.

Method for accessing logical type of values this deserializer produces. Typically used for further configuring handling of values, for example, to find which coercions are legal.

Annotations
@Override
withLeniencyback to summary
protected abstract JSR310DeserializerBase<T> withLeniency(Boolean leniency)