com.fasterxml.jackson.databind.jsontype.TypeDeserializer that reads typing metadata from Ion type
annotations. Annotations found are processed by the configured TypeIdResolver to provide a concrete Java
class, which is in turn used to find the appropriate JsonDeserializer, and execute it.
If multiple annotations are found, the first annotation to resolve to a non-null JavaType using the
configured TypeIdResolver is used. Ion provides type annotations in alphabetic order.
MultipleTypeIdResolver
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | IonAnnotationTypeDeserializer(JavaType baseType, TypeIdResolver idRes, String typePropertyName, boolean typeIdVisible, JavaType defaultImpl)
|
| Modifier and Type | Method and Description |
|---|---|
| private Object | |
| public Object | deserializeTypedFromAny(JsonParser p, DeserializationContext ctxt)
Implements abstract com. 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). |
| public Object | deserializeTypedFromArray(JsonParser p, DeserializationContext ctxt)
Implements abstract com. Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Array (regardless of Java type). |
| public Object | deserializeTypedFromObject(JsonParser p, DeserializationContext ctxt)
Implements abstract com. Method called to let this type deserializer handle deserialization of "typed" object, when value itself is serialized as JSON Object (regardless of Java type). |
| public Object | deserializeTypedFromScalar(JsonParser p, DeserializationContext ctxt)
Implements abstract com. 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. |
| public TypeDeserializer | forProperty(BeanProperty prop)
Implements abstract com. Method called to create contextual version, to be used for values of given property. |
| public JsonTypeInfo. | Returns: nullImplements abstract com. Used for informational purposes and some serialization-implementation-specific logics (which do not concern us). |
| private IonParser |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| IonAnnotationTypeDeserializer | back to summary |
|---|---|
| public IonAnnotationTypeDeserializer(JavaType baseType, TypeIdResolver idRes, String typePropertyName, boolean typeIdVisible, JavaType defaultImpl) | |
| _deserialize | back to summary |
|---|---|
| private Object _deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException | |
| deserializeTypedFromAny | back to summary |
|---|---|
| public Object deserializeTypedFromAny(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException Implements abstract com. Doc from com. 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).
| |
| deserializeTypedFromArray | back to summary |
|---|---|
| public Object deserializeTypedFromArray(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException Implements abstract com. Doc from com. 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, locate
| |
| deserializeTypedFromObject | back to summary |
|---|---|
| public Object deserializeTypedFromObject(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException Implements abstract com. Doc from com. Method 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, locate
| |
| deserializeTypedFromScalar | back to summary |
|---|---|
| public Object deserializeTypedFromScalar(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException Implements abstract com. Doc from com. 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, locate
| |
| forProperty | back to summary |
|---|---|
| public TypeDeserializer forProperty(BeanProperty prop) Implements abstract com. Doc from com. 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
(for
| |
| getTypeInclusion | back to summary |
|---|---|
| public JsonTypeInfo. Implements abstract com. Used for informational purposes and some serialization-implementation-specific logics (which do not concern us). We have to return an enum which we cannot extend, and none of them accurately reflect what we do.
| |
| ionParser | back to summary |
|---|---|
| private IonParser ionParser(JsonParser p) throws JsonParseException | |