Class BeanDeserializer
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonDeserializer<T>
-
- com.fasterxml.jackson.databind.deser.std.StdDeserializer<java.lang.Object>
-
- com.fasterxml.jackson.databind.deser.BeanDeserializerBase
-
- com.fasterxml.jackson.databind.deser.BeanDeserializer
-
- All Implemented Interfaces:
ContextualDeserializer
,NullValueProvider
,ResolvableDeserializer
,ValueInstantiator.Gettable
,java.io.Serializable
- Direct Known Subclasses:
ThrowableDeserializer
public class BeanDeserializer extends BeanDeserializerBase implements java.io.Serializable
Deserializer class that can deserialize instances of arbitrary bean objects, usually from JSON Object structs,- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
JsonDeserializer.None
-
-
Constructor Summary
Constructors Constructor Description BeanDeserializer(BeanDeserializerBase src, BeanPropertyMap props)
BeanDeserializer(BeanDeserializerBase src, ObjectIdReader oir)
BeanDeserializer(BeanDeserializerBase src, java.util.Set<java.lang.String> ignorableProps)
Deprecated.in 2.12, remove from 3.0BeanDeserializer(BeanDeserializerBase src, java.util.Set<java.lang.String> ignorableProps, java.util.Set<java.lang.String> includableProps)
BeanDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, java.util.Map<java.lang.String,SettableBeanProperty> backRefs, java.util.HashSet<java.lang.String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews)
Deprecated.in 2.12, remove from 3.0BeanDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, java.util.Map<java.lang.String,SettableBeanProperty> backRefs, java.util.HashSet<java.lang.String> ignorableProps, boolean ignoreAllUnknown, java.util.Set<java.lang.String> includableProps, boolean hasViews)
Constructor used byBeanDeserializerBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
deserialize(JsonParser p, DeserializationContext ctxt)
Main deserialization method for bean-based objects (POJOs).java.lang.Object
deserialize(JsonParser p, DeserializationContext ctxt, java.lang.Object bean)
Secondary deserialization method, called in cases where POJO instance is created as part of deserialization, potentially after collecting some or all of the properties to set.java.lang.Object
deserializeFromObject(JsonParser p, DeserializationContext ctxt)
General version used when handling needs more advanced features.JsonDeserializer<java.lang.Object>
unwrappingDeserializer(NameTransformer transformer)
Method that will return deserializer instance that is able to handle "unwrapped" value instances If no unwrapped instance can be constructed, will simply return this object as-is.BeanDeserializerBase
withBeanProperties(BeanPropertyMap props)
Mutant factory method that custom sub-classes must override; not left as abstract to prevent more drastic backwards compatibility problems.BeanDeserializer
withByNameInclusion(java.util.Set<java.lang.String> ignorableProps, java.util.Set<java.lang.String> includableProps)
BeanDeserializerBase
withIgnoreAllUnknown(boolean ignoreUnknown)
BeanDeserializer
withObjectIdReader(ObjectIdReader oir)
-
Methods inherited from class com.fasterxml.jackson.databind.deser.BeanDeserializerBase
createContextual, creatorProperties, deserializeFromArray, deserializeFromBoolean, deserializeFromDouble, deserializeFromEmbedded, deserializeFromNumber, deserializeFromString, deserializeWithType, findBackReference, findProperty, findProperty, findProperty, getBeanClass, getEmptyAccessPattern, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getObjectIdReader, getPropertyCount, getValueInstantiator, getValueType, handledType, hasProperty, hasViews, isCachable, isCaseInsensitive, logicalType, properties, replaceProperty, resolve, supportsUpdate, withIgnorableProperties, wrapAndThrow
-
Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer
getValueClass, getValueType
-
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserializeWithType, getAbsentValue, getDelegatee, getEmptyValue, getNullValue, getNullValue, replaceDelegatee
-
-
-
-
Constructor Detail
-
BeanDeserializer
@Deprecated public BeanDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, java.util.Map<java.lang.String,SettableBeanProperty> backRefs, java.util.HashSet<java.lang.String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews)
Deprecated.in 2.12, remove from 3.0Constructor used byBeanDeserializerBuilder
.
-
BeanDeserializer
public BeanDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, java.util.Map<java.lang.String,SettableBeanProperty> backRefs, java.util.HashSet<java.lang.String> ignorableProps, boolean ignoreAllUnknown, java.util.Set<java.lang.String> includableProps, boolean hasViews)
Constructor used byBeanDeserializerBuilder
.- Since:
- 2.12
-
BeanDeserializer
public BeanDeserializer(BeanDeserializerBase src, ObjectIdReader oir)
-
BeanDeserializer
@Deprecated public BeanDeserializer(BeanDeserializerBase src, java.util.Set<java.lang.String> ignorableProps)
Deprecated.in 2.12, remove from 3.0
-
BeanDeserializer
public BeanDeserializer(BeanDeserializerBase src, java.util.Set<java.lang.String> ignorableProps, java.util.Set<java.lang.String> includableProps)
- Since:
- 2.12
-
BeanDeserializer
public BeanDeserializer(BeanDeserializerBase src, BeanPropertyMap props)
-
-
Method Detail
-
unwrappingDeserializer
public JsonDeserializer<java.lang.Object> unwrappingDeserializer(NameTransformer transformer)
Description copied from class:JsonDeserializer
Method that will return deserializer instance that is able to handle "unwrapped" value instances If no unwrapped instance can be constructed, will simply return this object as-is.Default implementation just returns 'this' indicating that no unwrapped variant exists
- Specified by:
unwrappingDeserializer
in classBeanDeserializerBase
-
withObjectIdReader
public BeanDeserializer withObjectIdReader(ObjectIdReader oir)
- Specified by:
withObjectIdReader
in classBeanDeserializerBase
-
withByNameInclusion
public BeanDeserializer withByNameInclusion(java.util.Set<java.lang.String> ignorableProps, java.util.Set<java.lang.String> includableProps)
- Specified by:
withByNameInclusion
in classBeanDeserializerBase
-
withIgnoreAllUnknown
public BeanDeserializerBase withIgnoreAllUnknown(boolean ignoreUnknown)
- Specified by:
withIgnoreAllUnknown
in classBeanDeserializerBase
-
withBeanProperties
public BeanDeserializerBase withBeanProperties(BeanPropertyMap props)
Description copied from class:BeanDeserializerBase
Mutant factory method that custom sub-classes must override; not left as abstract to prevent more drastic backwards compatibility problems.- Overrides:
withBeanProperties
in classBeanDeserializerBase
-
deserialize
public java.lang.Object deserialize(JsonParser p, DeserializationContext ctxt) throws java.io.IOException
Main deserialization method for bean-based objects (POJOs).- Specified by:
deserialize
in classJsonDeserializer<java.lang.Object>
- Parameters:
p
- Parsed used for reading JSON contentctxt
- Context that can be used to access information about this deserialization activity.- Returns:
- Deserialized value
- Throws:
java.io.IOException
-
deserialize
public java.lang.Object deserialize(JsonParser p, DeserializationContext ctxt, java.lang.Object bean) throws java.io.IOException
Secondary deserialization method, called in cases where POJO instance is created as part of deserialization, potentially after collecting some or all of the properties to set.- Overrides:
deserialize
in classJsonDeserializer<java.lang.Object>
- Throws:
java.io.IOException
-
deserializeFromObject
public java.lang.Object deserializeFromObject(JsonParser p, DeserializationContext ctxt) throws java.io.IOException
General version used when handling needs more advanced features.- Specified by:
deserializeFromObject
in classBeanDeserializerBase
- Throws:
java.io.IOException
-
-