protected abstract static class NumberDeserializers.PrimitiveOrWrapperDeserializer<T> extends StdScalarDeserializer<T>
JsonDeserializer.None
Modifier and Type | Field and Description |
---|---|
protected T |
_emptyValue |
protected T |
_nullValue |
protected boolean |
_primitive |
_valueClass, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS
Modifier | Constructor and Description |
---|---|
protected |
NumberDeserializers.PrimitiveOrWrapperDeserializer(Class<T> vc,
T nvl,
T empty) |
Modifier and Type | Method and Description |
---|---|
Object |
getEmptyValue(DeserializationContext ctxt)
Method called to determine value to be used for "empty" values
(most commonly when deserializing from empty JSON Strings).
|
AccessPattern |
getNullAccessPattern()
Default implementation indicates that "null value" to use for input null
is simply Java `null` for all deserializers, unless overridden by sub-classes.
|
T |
getNullValue(DeserializationContext ctxt)
Method that can be called to determine value to be used for
representing null values (values deserialized when JSON token
is
JsonToken.VALUE_NULL ). |
deserialize, deserializeWithType, getEmptyAccessPattern, supportsUpdate
_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _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, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
deserialize, findBackReference, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, unwrappingDeserializer
protected final T _nullValue
protected final T _emptyValue
protected final boolean _primitive
public AccessPattern getNullAccessPattern()
JsonDeserializer
getNullAccessPattern
in interface NullValueProvider
getNullAccessPattern
in class StdScalarDeserializer<T>
public final T getNullValue(DeserializationContext ctxt) throws JsonMappingException
JsonDeserializer
JsonToken.VALUE_NULL
). Usually this is simply
Java null, but for some types (especially primitives) it may be
necessary to use non-null values.
Since version 2.6 (in which the context argument was added), call is expected to be made each and every time a null token needs to be handled.
Default implementation simply returns null.
getNullValue
in interface NullValueProvider
getNullValue
in class JsonDeserializer<T>
JsonMappingException
public Object getEmptyValue(DeserializationContext ctxt) throws JsonMappingException
JsonDeserializer
JsonDeserializer.getNullValue(com.fasterxml.jackson.databind.DeserializationContext)
(which in turn
is usually simply Java null), but it can be overridden
for types. Or, if type should never be converted from empty
String, method can also throw an exception.
Since version 2.6 (in which the context argument was added), call is expected to be made each and every time an empty value is needed.
Since version 2.9 does not require return of `T` any more.
Default implementation simply calls JsonDeserializer.getNullValue(com.fasterxml.jackson.databind.DeserializationContext)
and
returns value.
getEmptyValue
in class JsonDeserializer<T>
JsonMappingException
Copyright © 2008–2017 FasterXML. All rights reserved.