Class StdScalarDeserializer<T>
java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<T>
com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<T>
- All Implemented Interfaces:
NullValueProvider,ValueInstantiator.Gettable,Serializable
- Direct Known Subclasses:
AtomicBooleanDeserializer,AtomicIntegerDeserializer,AtomicLongDeserializer,BaseScalarOptionalDeserializer,ByteBufferDeserializer,DataHandlerDeserializer,DateDeserializers.DateBasedDeserializer,DurationDeserializer,EnumDeserializer,FromStringDeserializer,JSR310DateTimeDeserializerBase,JSR310StringParsableDeserializer,NioPathDeserializer,NumberDeserializers.BigDecimalDeserializer,NumberDeserializers.BigIntegerDeserializer,NumberDeserializers.NumberDeserializer,NumberDeserializers.PrimitiveOrWrapperDeserializer,StackTraceElementDeserializer,StringDeserializer,TokenBufferDeserializer
Base class for deserializers that handle types that are serialized
as JSON scalars (non-structured, i.e. non-Object, non-Array, values).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
JsonDeserializer.None -
Field Summary
Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer
_valueClass, _valueType, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedStdScalarDeserializer(JavaType valueType) protectedStdScalarDeserializer(Class<?> vc) -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(JsonParser p, DeserializationContext ctxt, T intoValue) Overridden to simply calldeserialize()method that does not take value to update, since scalar values are usually non-mergeable.deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) Base implementation that does not assume specific type inclusion mechanism.This method may be called in conjunction with calls toJsonDeserializer.getEmptyValue(DeserializationContext), to check whether it needs to be called just once (static values), or each time empty value is needed.This method may be called in conjunction with calls toJsonDeserializer.getNullValue(DeserializationContext), to check whether it needs to be called just once (static values), or each time empty value is needed.Method for accessing logical type of values this deserializer produces.supportsUpdate(DeserializationConfig config) By default assumption is that scalar types cannot be updated: many are immutable values (such as primitives and wrappers)Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer
_byteOverflow, _checkBooleanToStringCoercion, _checkCoercionFail, _checkDoubleSpecialValue, _checkFloatSpecialValue, _checkFloatToIntCoercion, _checkFloatToStringCoercion, _checkFromStringCoercion, _checkFromStringCoercion, _checkIntToFloatCoercion, _checkIntToStringCoercion, _checkTextualNull, _checkToStringCoercion, _coerceBooleanFromInt, _coercedTypeDesc, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeFromEmptyString, _deserializeFromString, _deserializeWrappedValue, _failDoubleToIntCoercion, _findCoercionFromBlankString, _findCoercionFromEmptyArray, _findCoercionFromEmptyString, _findNullProvider, _hasTextualNull, _intOverflow, _isBlank, _isEmptyOrTextualNull, _isFalse, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _isTrue, _neitherNull, _nonNullNumber, _parseBoolean, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDouble, _parseDouble, _parseDoublePrimitive, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseInteger, _parseInteger, _parseIntPrimitive, _parseIntPrimitive, _parseLong, _parseLong, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueInstantiator, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleNestedArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializerMethods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullValue, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, unwrappingDeserializer
-
Constructor Details
-
StdScalarDeserializer
-
StdScalarDeserializer
-
StdScalarDeserializer
-
-
Method Details
-
logicalType
Description copied from class:JsonDeserializerMethod 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.- Overrides:
logicalTypein classJsonDeserializer<T>- Returns:
- Logical type of values this deserializer produces, if known;
nullif not
-
supportsUpdate
By default assumption is that scalar types cannot be updated: many are immutable values (such as primitives and wrappers)- Overrides:
supportsUpdatein classJsonDeserializer<T>
-
getNullAccessPattern
Description copied from class:JsonDeserializerThis method may be called in conjunction with calls toJsonDeserializer.getNullValue(DeserializationContext), to check whether it needs to be called just once (static values), or each time empty value is needed.Default implementation indicates that the "null value" to use for input null does not vary across uses so that
JsonDeserializer.getNullValue(DeserializationContext)need not be called more than once per deserializer instance. This information may be used as optimization.- Specified by:
getNullAccessPatternin interfaceNullValueProvider- Overrides:
getNullAccessPatternin classJsonDeserializer<T>
-
getEmptyAccessPattern
Description copied from class:JsonDeserializerThis method may be called in conjunction with calls toJsonDeserializer.getEmptyValue(DeserializationContext), to check whether it needs to be called just once (static values), or each time empty value is needed.- Overrides:
getEmptyAccessPatternin classJsonDeserializer<T>
-
deserializeWithType
public Object deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException Description copied from class:StdDeserializerBase implementation that does not assume specific type inclusion mechanism. Sub-classes are expected to override this method if they are to handle type information.- Overrides:
deserializeWithTypein classStdDeserializer<T>typeDeserializer- Deserializer to use for handling type information- Throws:
IOException
-
deserialize
Overridden to simply calldeserialize()method that does not take value to update, since scalar values are usually non-mergeable.- Overrides:
deserializein classJsonDeserializer<T>- Throws:
IOException
-