public abstract class AbstractBeanJsonDeserializer<T> extends JsonDeserializer<T>
JsonDeserializer for beans.| Modifier and Type | Field and Description |
|---|---|
protected InstanceBuilder<T> |
instanceBuilder |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBeanJsonDeserializer() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canDeserialize() |
T |
deserializeInline(JsonReader reader,
JsonDeserializationContext ctx,
JsonDeserializerParameters params,
IdentityDeserializationInfo identityInfo,
TypeDeserializationInfo typeInfo,
java.lang.String type,
java.util.Map<java.lang.String,java.lang.String> bufferedProperties)
Deserializes all the properties of the bean.
|
T |
deserializeWrapped(JsonReader reader,
JsonDeserializationContext ctx,
JsonDeserializerParameters params,
IdentityDeserializationInfo identityInfo,
TypeDeserializationInfo typeInfo,
java.lang.String typeInformation) |
T |
doDeserialize(JsonReader reader,
JsonDeserializationContext ctx,
JsonDeserializerParameters params)
Deserializes a non-null JSON input into an object.
|
abstract java.lang.Class |
getDeserializedType() |
AbstractBeanJsonDeserializer<T> |
getDeserializer() |
protected AnySetterDeserializer<T,?> |
initAnySetterDeserializer()
Initialize the
AnySetterDeserializer. |
protected SimpleStringMap<BackReferenceProperty<T,?>> |
initBackReferenceDeserializers()
Initialize the
SimpleStringMap containing the back reference deserializers. |
protected SimpleStringMap<BeanPropertyDeserializer<T,?>> |
initDeserializers()
Initialize the
SimpleStringMap containing the property deserializers. |
protected IdentityDeserializationInfo<T> |
initIdentityInfo()
Initialize the
IdentityDeserializationInfo. |
protected java.util.Set<java.lang.String> |
initIgnoredProperties()
Initialize the
Set containing the ignored property names. |
protected InstanceBuilder<T> |
initInstanceBuilder()
Initialize the
InstanceBuilder. |
protected java.util.Map<java.lang.Class,SubtypeDeserializer> |
initMapSubtypeClassToDeserializer()
Initialize the
Map containing the SubtypeDeserializer. |
protected java.util.Set<java.lang.String> |
initRequiredProperties()
Initialize the
Set containing the required property names. |
protected TypeDeserializationInfo<T> |
initTypeInfo()
Initialize the
TypeDeserializationInfo. |
protected boolean |
isDefaultIgnoreUnknown()
Whether encountering of unknown
properties should result in a failure (by throwing a
JsonDeserializationException) or not. |
void |
setBackReference(java.lang.String referenceName,
java.lang.Object reference,
T value,
JsonDeserializationContext ctx)
Set the back reference.
|
deserialize, deserialize, deserializeNullValueprotected final InstanceBuilder<T> instanceBuilder
protected InstanceBuilder<T> initInstanceBuilder()
InstanceBuilder. Returns null if the class isn't instantiable.protected SimpleStringMap<BeanPropertyDeserializer<T,?>> initDeserializers()
SimpleStringMap containing the property deserializers. Returns an empty map if there are no properties to
deserialize.protected SimpleStringMap<BackReferenceProperty<T,?>> initBackReferenceDeserializers()
SimpleStringMap containing the back reference deserializers. Returns an empty map if there are no back
reference on the bean.protected java.util.Set<java.lang.String> initIgnoredProperties()
Set containing the ignored property names. Returns an empty set if there are no ignored properties.protected java.util.Set<java.lang.String> initRequiredProperties()
Set containing the required property names. Returns an empty set if there are no required properties.protected IdentityDeserializationInfo<T> initIdentityInfo()
IdentityDeserializationInfo. Returns null if there is no JsonIdentityInfo annotation on bean.protected TypeDeserializationInfo<T> initTypeInfo()
TypeDeserializationInfo. Returns null if there is no JsonTypeInfo annotation on bean.protected java.util.Map<java.lang.Class,SubtypeDeserializer> initMapSubtypeClassToDeserializer()
Map containing the SubtypeDeserializer. Returns an empty map if the bean has no subtypes.protected AnySetterDeserializer<T,?> initAnySetterDeserializer()
AnySetterDeserializer. Returns null if there is no method annoted with JsonAnySetter on bean.protected boolean isDefaultIgnoreUnknown()
JsonDeserializationException) or not.public abstract java.lang.Class getDeserializedType()
public T doDeserialize(JsonReader reader, JsonDeserializationContext ctx, JsonDeserializerParameters params)
JsonDeserializerdoDeserialize in class JsonDeserializer<T>reader - JsonReader used to read the JSON inputctx - Context for the full deserialization processparams - Parameters for this deserializationprotected boolean canDeserialize()
public T deserializeWrapped(JsonReader reader, JsonDeserializationContext ctx, JsonDeserializerParameters params, IdentityDeserializationInfo identityInfo, TypeDeserializationInfo typeInfo, java.lang.String typeInformation)
public final T deserializeInline(JsonReader reader, JsonDeserializationContext ctx, JsonDeserializerParameters params, IdentityDeserializationInfo identityInfo, TypeDeserializationInfo typeInfo, java.lang.String type, java.util.Map<java.lang.String,java.lang.String> bufferedProperties)
JsonReader must be in a json object.reader - readerctx - context of the deserialization processtype - in case of a subtype, it's the corresponding type valuebufferedProperties - Buffered properties in case the type info property was not in 1st positionpublic AbstractBeanJsonDeserializer<T> getDeserializer()
public void setBackReference(java.lang.String referenceName,
java.lang.Object reference,
T value,
JsonDeserializationContext ctx)
JsonDeserializersetBackReference in class JsonDeserializer<T>referenceName - name of the referencereference - reference to setvalue - value to set the reference to.ctx - Context for the full deserialization processJsonBackReferenceCopyright © 2015. All Rights Reserved.