Class BeanDeserializer
java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<Object>
com.fasterxml.jackson.databind.deser.std.StdDeserializer<Object>
com.fasterxml.jackson.databind.deser.BeanDeserializerBase
com.fasterxml.jackson.databind.deser.BeanDeserializer
- All Implemented Interfaces:
ContextualDeserializer
,NullValueProvider
,ResolvableDeserializer
,ValueInstantiator.Gettable
,Serializable
- Direct Known Subclasses:
ThrowableDeserializer
Deserializer class that can deserialize instances of
arbitrary bean objects, usually from JSON Object structs,
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
JsonDeserializer.None
-
Constructor Summary
ConstructorsConstructorDescriptionBeanDeserializer
(BeanDeserializerBase src, BeanPropertyMap props) BeanDeserializer
(BeanDeserializerBase src, Set<String> ignorableProps) Deprecated.in 2.12, remove from 3.0BeanDeserializer
(BeanDeserializerBase src, Set<String> ignorableProps, Set<String> includableProps) BeanDeserializer
(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs, HashSet<String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews) Deprecated.in 2.12, remove from 3.0BeanDeserializer
(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs, HashSet<String> ignorableProps, boolean ignoreAllUnknown, Set<String> includableProps, boolean hasViews) Constructor used byBeanDeserializerBuilder
. -
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(JsonParser p, DeserializationContext ctxt) Main deserialization method for bean-based objects (POJOs).deserialize
(JsonParser p, DeserializationContext ctxt, 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.General version used when handling needs more advanced features.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.Mutant factory method that custom sub-classes must override; not left as abstract to prevent more drastic backwards compatibility problems.withByNameInclusion
(Set<String> ignorableProps, Set<String> includableProps) withIgnoreAllUnknown
(boolean ignoreUnknown) 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 Details
-
BeanDeserializer
@Deprecated public BeanDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, Map<String, SettableBeanProperty> backRefs, HashSet<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, Map<String, SettableBeanProperty> backRefs, HashSet<String> ignorableProps, boolean ignoreAllUnknown, Set<String> includableProps, boolean hasViews) Constructor used byBeanDeserializerBuilder
.- Since:
- 2.12
-
BeanDeserializer
-
BeanDeserializer
Deprecated.in 2.12, remove from 3.0 -
BeanDeserializer
public BeanDeserializer(BeanDeserializerBase src, Set<String> ignorableProps, Set<String> includableProps) - Since:
- 2.12
-
BeanDeserializer
-
-
Method Details
-
unwrappingDeserializer
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
- Specified by:
withObjectIdReader
in classBeanDeserializerBase
-
withByNameInclusion
public BeanDeserializer withByNameInclusion(Set<String> ignorableProps, Set<String> includableProps) - Specified by:
withByNameInclusion
in classBeanDeserializerBase
-
withIgnoreAllUnknown
- Specified by:
withIgnoreAllUnknown
in classBeanDeserializerBase
-
withBeanProperties
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
Main deserialization method for bean-based objects (POJOs).- Specified by:
deserialize
in classJsonDeserializer<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:
IOException
-
deserialize
public Object deserialize(JsonParser p, DeserializationContext ctxt, Object bean) throws 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<Object>
- Throws:
IOException
-
deserializeFromObject
General version used when handling needs more advanced features.- Specified by:
deserializeFromObject
in classBeanDeserializerBase
- Throws:
IOException
-