|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.databind.jsontype.TypeDeserializer
public abstract class TypeDeserializer
Interface for deserializing type information from JSON content, to type-safely deserialize data into correct polymorphic instance (when type inclusion has been enabled for type handled).
Separate deserialization methods are needed because serialized
form for inclusion mechanism JsonTypeInfo.As.PROPERTY
is slighty different if value is not expressed as JSON Object:
and as such both type deserializer and serializer need to
JSON Object form (array, object or other (== scalar)) being used.
Constructor Summary | |
---|---|
TypeDeserializer()
|
Method Summary | |
---|---|
abstract Object |
deserializeTypedFromAny(JsonParser jp,
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). |
abstract Object |
deserializeTypedFromArray(JsonParser jp,
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). |
abstract Object |
deserializeTypedFromObject(JsonParser jp,
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). |
abstract Object |
deserializeTypedFromScalar(JsonParser jp,
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. |
abstract TypeDeserializer |
forProperty(BeanProperty prop)
Method called to create contextual version, to be used for values of given property. |
abstract Class<?> |
getDefaultImpl()
Accessor for "default implementation" type; optionally defined class to use in cases where type id is not accessible for some reason (either missing, or can not be resolved) |
abstract String |
getPropertyName()
Name of property that contains type information, if property-based inclusion is used. |
abstract TypeIdResolver |
getTypeIdResolver()
Accessor for object that handles conversions between types and matching type ids. |
abstract JsonTypeInfo.As |
getTypeInclusion()
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeDeserializer()
Method Detail |
---|
public abstract TypeDeserializer forProperty(BeanProperty prop)
Collection
or Map
valued properties).
public abstract JsonTypeInfo.As getTypeInclusion()
public abstract String getPropertyName()
public abstract TypeIdResolver getTypeIdResolver()
public abstract Class<?> getDefaultImpl()
public abstract Object deserializeTypedFromObject(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
JsonDeserializer
to use, and
call it with JSON data to deserializer (which does not contain
type information).
IOException
JsonProcessingException
public abstract Object deserializeTypedFromArray(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
JsonDeserializer
to use, and
call it with JSON data to deserializer (which does not contain
type information).
IOException
JsonProcessingException
public abstract Object deserializeTypedFromScalar(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
JsonDeserializer
to use, and
call it with JSON data to deserializer (which does not contain
type information).
IOException
JsonProcessingException
public abstract Object deserializeTypedFromAny(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
IOException
JsonProcessingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |