Class AsWrapperTypeDeserializer
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.jsontype.TypeDeserializer
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer
- All Implemented Interfaces:
Serializable
Type deserializer used with
JsonTypeInfo.As.WRAPPER_OBJECT
inclusion mechanism. Simple since JSON structure used is always
the same, regardless of structure used for actual value: wrapping
is done using a single-element JSON Object where type id is the key,
and actual object data as the value.- See Also:
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase
_baseType, _defaultImpl, _defaultImplDeserializer, _deserializers, _idResolver, _property, _typeIdVisible, _typePropertyName
-
Constructor Summary
ModifierConstructorDescriptionAsWrapperTypeDeserializer
(JavaType bt, TypeIdResolver idRes, String typePropertyName, boolean typeIdVisible, JavaType defaultImpl) protected
AsWrapperTypeDeserializer
(AsWrapperTypeDeserializer src, BeanProperty property) -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
_deserialize
(JsonParser p, DeserializationContext ctxt) Method that handles type information wrapper, locates actual subtype deserializer to use, and calls it to do actual deserialization.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).Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Array (regardless of Java type).Deserializing type id enclosed using WRAPPER_OBJECT style is straightforwardMethod 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.forProperty
(BeanProperty prop) Method called to create contextual version, to be used for values of given property.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 edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase
_deserializeWithNativeTypeId, _deserializeWithNativeTypeId, _findDefaultImplDeserializer, _findDeserializer, _handleMissingTypeId, _handleUnknownTypeId, baseType, baseTypeName, getDefaultImpl, getPropertyName, getTypeIdResolver, hasDefaultImpl, toString
Methods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.jsontype.TypeDeserializer
deserializeIfNatural, deserializeIfNatural
-
Constructor Details
-
AsWrapperTypeDeserializer
public AsWrapperTypeDeserializer(JavaType bt, TypeIdResolver idRes, String typePropertyName, boolean typeIdVisible, JavaType defaultImpl) - Since:
- 2.8
-
AsWrapperTypeDeserializer
-
-
Method Details
-
forProperty
Description copied from class:TypeDeserializer
Method 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 (forCollection
orMap
valued properties).- Specified by:
forProperty
in classTypeDeserializerBase
-
getTypeInclusion
Description copied from class:TypeDeserializer
Accessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.- Specified by:
getTypeInclusion
in classTypeDeserializerBase
-
deserializeTypedFromObject
public Object deserializeTypedFromObject(JsonParser jp, DeserializationContext ctxt) throws IOException Deserializing type id enclosed using WRAPPER_OBJECT style is straightforward- Specified by:
deserializeTypedFromObject
in classTypeDeserializer
- Throws:
IOException
-
deserializeTypedFromArray
public Object deserializeTypedFromArray(JsonParser jp, DeserializationContext ctxt) throws IOException Description copied from class:TypeDeserializer
Method 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, locateJsonDeserializer
to use, and call it with JSON data to deserializer (which does not contain type information).- Specified by:
deserializeTypedFromArray
in classTypeDeserializer
- Throws:
IOException
-
deserializeTypedFromScalar
public Object deserializeTypedFromScalar(JsonParser jp, DeserializationContext ctxt) throws IOException Description copied from class:TypeDeserializer
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. Method needs to figure out intended polymorphic type, locateJsonDeserializer
to use, and call it with JSON data to deserializer (which does not contain type information).- Specified by:
deserializeTypedFromScalar
in classTypeDeserializer
- Throws:
IOException
-
deserializeTypedFromAny
public Object deserializeTypedFromAny(JsonParser jp, DeserializationContext ctxt) throws IOException Description copied from class:TypeDeserializer
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). 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:
deserializeTypedFromAny
in classTypeDeserializer
- Throws:
IOException
-
_deserialize
Method that handles type information wrapper, locates actual subtype deserializer to use, and calls it to do actual deserialization.- Throws:
IOException
-