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
,Serializable
- Direct Known Subclasses:
AtomicBooleanDeserializer
,ByteBufferDeserializer
,DateDeserializers.CalendarDeserializer
,DateDeserializers.DateDeserializer
,DateDeserializers.SqlDateDeserializer
,DateDeserializers.TimestampDeserializer
,EnumDeserializer
,FromStringDeserializer
,NioPathDeserializer
,NumberDeserializers.BigDecimalDeserializer
,NumberDeserializers.BigIntegerDeserializer
,NumberDeserializers.BooleanDeserializer
,NumberDeserializers.ByteDeserializer
,NumberDeserializers.CharacterDeserializer
,NumberDeserializers.DoubleDeserializer
,NumberDeserializers.FloatDeserializer
,NumberDeserializers.IntegerDeserializer
,NumberDeserializers.LongDeserializer
,NumberDeserializers.NumberDeserializer
,NumberDeserializers.ShortDeserializer
,StackTraceElementDeserializer
,StringDeserializer
,TokenBufferDeserializer
public abstract class StdScalarDeserializer<T> extends StdDeserializer<T>
Base class for deserializers that handle types that are serialized as JSON scalars (non-structured, i.e. non-Object, non-Array, values).- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
JsonDeserializer.None
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
deserialize(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.Object
deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer)
Base implementation that does not assume specific type inclusion mechanism.AccessPattern
getEmptyAccessPattern()
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.AccessPattern
getNullAccessPattern()
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.Boolean
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
getValueClass, getValueType, getValueType, handledType
-
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, findBackReference, getDelegatee, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullValue, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, unwrappingDeserializer
-
-
-
-
Method Detail
-
deserializeWithType
public Object deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException
Description copied from class:StdDeserializer
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.- Overrides:
deserializeWithType
in classStdDeserializer<T>
typeDeserializer
- Deserializer to use for handling type information- Throws:
IOException
-
deserialize
public T deserialize(JsonParser p, DeserializationContext ctxt, T intoValue) throws IOException
Overridden to simply calldeserialize()
method that does not take value to update, since scalar values are usually non-mergeable.- Overrides:
deserialize
in classJsonDeserializer<T>
- Throws:
IOException
-
supportsUpdate
public Boolean supportsUpdate(DeserializationConfig config)
By default assumption is that scalar types cannot be updated: many are immutable values (such as primitives and wrappers)- Overrides:
supportsUpdate
in classJsonDeserializer<T>
-
getNullAccessPattern
public AccessPattern getNullAccessPattern()
Description copied from class:JsonDeserializer
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.Default implementation indicates that "null value" to use for input null is simply Java `null` for all deserializers, unless overridden by sub-classes. This information may be used as optimization.
- Specified by:
getNullAccessPattern
in interfaceNullValueProvider
- Overrides:
getNullAccessPattern
in classJsonDeserializer<T>
-
getEmptyAccessPattern
public AccessPattern getEmptyAccessPattern()
Description copied from class:JsonDeserializer
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.- Overrides:
getEmptyAccessPattern
in classJsonDeserializer<T>
-
-