protected abstract static class NumberDeserializers.PrimitiveOrWrapperDeserializer<T> extends StdScalarDeserializer<T>
JsonDeserializer.None
Modifier and Type | Field and Description |
---|---|
protected T |
_nullValue |
protected boolean |
_primitive |
_valueClass, F_MASK_INT_COERCIONS
Modifier | Constructor and Description |
---|---|
protected |
NumberDeserializers.PrimitiveOrWrapperDeserializer(Class<T> vc,
T nvl) |
Modifier and Type | Method and Description |
---|---|
T |
getEmptyValue(DeserializationContext ctxt)
Method called to determine value to be used for "empty" values
(most commonly when deserializing from empty JSON Strings).
|
T |
getNullValue()
Deprecated.
|
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 ). |
deserializeWithType
_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
deserialize, deserialize, findBackReference, getDelegatee, getEmptyValue, getKnownPropertyNames, getObjectIdReader, isCachable, replaceDelegatee, unwrappingDeserializer
protected final T _nullValue
protected final boolean _primitive
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 class JsonDeserializer<T>
JsonMappingException
@Deprecated public final T getNullValue()
getNullValue
in class JsonDeserializer<T>
public T 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.
Default implementation simple calls JsonDeserializer.getNullValue(com.fasterxml.jackson.databind.DeserializationContext)
and
returns value.
getEmptyValue
in class JsonDeserializer<T>
JsonMappingException
Copyright © 2008–2018 FasterXML. All rights reserved.