Module tools.jackson.databind
Class NoOpTypeDeserializer
java.lang.Object
tools.jackson.databind.jsontype.TypeDeserializer
tools.jackson.databind.jsontype.impl.NoOpTypeDeserializer
Special
TypeDeserializer implementation used to explicitly
block type deserialization. This is used when a property or class
is annotated with @JsonTypeInfo(use = Id.NONE), indicating
that type information should not be expected or processed even if
the value type has a class-level type info annotation.
Unlike returning null (which means "no special type handling,
use defaults"), this actively prevents type information from being read.
- Since:
- 3.1
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object_deserialize(tools.jackson.core.JsonParser p, DeserializationContext ctxt) deserializeTypedFromAny(tools.jackson.core.JsonParser p, DeserializationContext ctxt) Method called to let this type deserializer handle deserialization of "typed" object, when value itself may have been serialized using any kind of JSON value (Array, Object, scalar).deserializeTypedFromArray(tools.jackson.core.JsonParser p, DeserializationContext ctxt) Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Array (regardless of Java type).deserializeTypedFromObject(tools.jackson.core.JsonParser p, DeserializationContext ctxt) Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Object (regardless of Java type).deserializeTypedFromScalar(tools.jackson.core.JsonParser p, DeserializationContext ctxt) Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as a scalar JSON value (something other than Array or Object), regardless of Java type.static NoOpTypeDeserializerforBaseType(DeserializationContext ctxt, JavaType baseType) forProperty(BeanProperty prop) Method called to create contextual version, to be used for values of given property.Class<?>Accessor for "default implementation" type; optionally defined class to use in cases where type id is not accessible for some reason (either missing, or cannot be resolved)Name of property that contains type information, if property-based inclusion is used.Accessor for object that handles conversions between types and matching type ids.Accessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.Methods inherited from class tools.jackson.databind.jsontype.TypeDeserializer
deserializeIfNatural, deserializeIfNatural, hasDefaultImpl
-
Method Details
-
forBaseType
-
forProperty
Description copied from class:TypeDeserializerMethod called to create contextual version, to be used for values of given property. This may be the type itself (as is the case for bean properties), or values contained (forCollectionorMapvalued properties).- Specified by:
forPropertyin classTypeDeserializer
-
getTypeInclusion
Description copied from class:TypeDeserializerAccessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.- Specified by:
getTypeInclusionin classTypeDeserializer
-
getPropertyName
Description copied from class:TypeDeserializerName of property that contains type information, if property-based inclusion is used.- Specified by:
getPropertyNamein classTypeDeserializer
-
getTypeIdResolver
Description copied from class:TypeDeserializerAccessor for object that handles conversions between types and matching type ids.- Specified by:
getTypeIdResolverin classTypeDeserializer
-
getDefaultImpl
Description copied from class:TypeDeserializerAccessor for "default implementation" type; optionally defined class to use in cases where type id is not accessible for some reason (either missing, or cannot be resolved)- Specified by:
getDefaultImplin classTypeDeserializer
-
deserializeTypedFromObject
public Object deserializeTypedFromObject(tools.jackson.core.JsonParser p, DeserializationContext ctxt) throws tools.jackson.core.JacksonException Description copied from class:TypeDeserializerMethod called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Object (regardless of Java type). Method needs to figure out intended polymorphic type, locateValueDeserializerto use, and call it with JSON data to deserializer (which does not contain type information).- Specified by:
deserializeTypedFromObjectin classTypeDeserializer- Throws:
tools.jackson.core.JacksonException
-
deserializeTypedFromArray
public Object deserializeTypedFromArray(tools.jackson.core.JsonParser p, DeserializationContext ctxt) throws tools.jackson.core.JacksonException Description copied from class:TypeDeserializerMethod called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Array (regardless of Java type). Method needs to figure out intended polymorphic type, locateValueDeserializerto use, and call it with JSON data to deserializer (which does not contain type information).- Specified by:
deserializeTypedFromArrayin classTypeDeserializer- Throws:
tools.jackson.core.JacksonException
-
deserializeTypedFromScalar
public Object deserializeTypedFromScalar(tools.jackson.core.JsonParser p, DeserializationContext ctxt) throws tools.jackson.core.JacksonException Description copied from class:TypeDeserializerMethod called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as a scalar JSON value (something other than Array or Object), regardless of Java type. Method needs to figure out intended polymorphic type, locateValueDeserializerto use, and call it with JSON data to deserializer (which does not contain type information).- Specified by:
deserializeTypedFromScalarin classTypeDeserializer- Throws:
tools.jackson.core.JacksonException
-
deserializeTypedFromAny
public Object deserializeTypedFromAny(tools.jackson.core.JsonParser p, DeserializationContext ctxt) throws tools.jackson.core.JacksonException Description copied from class:TypeDeserializerMethod called to let this type deserializer handle deserialization of "typed" object, when value itself may have been serialized using any kind of JSON value (Array, Object, scalar). Should only be called if JSON serialization is polymorphic (not Java type); for example when using JSON node representation, or "untyped" Java object (which may be Map, Collection, wrapper/primitive etc).- Specified by:
deserializeTypedFromAnyin classTypeDeserializer- Throws:
tools.jackson.core.JacksonException
-
_deserialize
protected Object _deserialize(tools.jackson.core.JsonParser p, DeserializationContext ctxt) throws tools.jackson.core.JacksonException - Throws:
tools.jackson.core.JacksonException
-