public class BuilderBasedDeserializer extends BeanDeserializerBase
Note on implementation: much of code has been copied from
BeanDeserializer
; there may be opportunities to
refactor this in future.
JsonDeserializer.None
Constructor and Description |
---|
BuilderBasedDeserializer(BeanDeserializerBuilder builder,
BeanDescription beanDesc,
BeanPropertyMap properties,
java.util.Map<java.lang.String,SettableBeanProperty> backRefs,
java.util.Set<java.lang.String> ignorableProps,
boolean ignoreAllUnknown,
boolean hasViews)
Deprecated.
Since 2.9
|
BuilderBasedDeserializer(BeanDeserializerBuilder builder,
BeanDescription beanDesc,
JavaType targetType,
BeanPropertyMap properties,
java.util.Map<java.lang.String,SettableBeanProperty> backRefs,
java.util.Set<java.lang.String> ignorableProps,
boolean ignoreAllUnknown,
boolean hasViews)
Constructor used by
BeanDeserializerBuilder . |
BuilderBasedDeserializer(BuilderBasedDeserializer src,
BeanPropertyMap props) |
BuilderBasedDeserializer(BuilderBasedDeserializer src,
ObjectIdReader oir) |
BuilderBasedDeserializer(BuilderBasedDeserializer src,
java.util.Set<java.lang.String> ignorableProps) |
Modifier and Type | Method and 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 value)
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.
|
java.lang.Boolean |
supportsUpdate(DeserializationConfig config)
Introspection method that may be called to see whether deserializer supports
update of an existing value (aka "merging") or not.
|
JsonDeserializer<java.lang.Object> |
unwrappingDeserializer(NameTransformer unwrapper)
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.
|
BeanDeserializerBase |
withIgnorableProperties(java.util.Set<java.lang.String> ignorableProps) |
BeanDeserializerBase |
withObjectIdReader(ObjectIdReader oir) |
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, properties, replaceProperty, resolve, wrapAndThrow
getValueClass, getValueType
deserializeWithType, getDelegatee, getEmptyValue, getNullValue, getNullValue, replaceDelegatee
public BuilderBasedDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, JavaType targetType, BeanPropertyMap properties, java.util.Map<java.lang.String,SettableBeanProperty> backRefs, java.util.Set<java.lang.String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews)
BeanDeserializerBuilder
.@Deprecated public BuilderBasedDeserializer(BeanDeserializerBuilder builder, BeanDescription beanDesc, BeanPropertyMap properties, java.util.Map<java.lang.String,SettableBeanProperty> backRefs, java.util.Set<java.lang.String> ignorableProps, boolean ignoreAllUnknown, boolean hasViews)
public BuilderBasedDeserializer(BuilderBasedDeserializer src, ObjectIdReader oir)
public BuilderBasedDeserializer(BuilderBasedDeserializer src, java.util.Set<java.lang.String> ignorableProps)
public BuilderBasedDeserializer(BuilderBasedDeserializer src, BeanPropertyMap props)
public JsonDeserializer<java.lang.Object> unwrappingDeserializer(NameTransformer unwrapper)
JsonDeserializer
Default implementation just returns 'this' indicating that no unwrapped variant exists
unwrappingDeserializer
in class BeanDeserializerBase
public BeanDeserializerBase withObjectIdReader(ObjectIdReader oir)
withObjectIdReader
in class BeanDeserializerBase
public BeanDeserializerBase withIgnorableProperties(java.util.Set<java.lang.String> ignorableProps)
withIgnorableProperties
in class BeanDeserializerBase
public BeanDeserializerBase withBeanProperties(BeanPropertyMap props)
BeanDeserializerBase
withBeanProperties
in class BeanDeserializerBase
public java.lang.Boolean supportsUpdate(DeserializationConfig config)
JsonDeserializer
Boolean.FALSE
if update is not supported at all (immutable values);
Boolean.TRUE
if update should usually work (regular POJOs, for example),
or null
if this is either not known, or may sometimes work.
Information gathered is typically used to either prevent merging update for
property (either by skipping, if based on global defaults; or by exception during
deserialization construction if explicit attempt made) if Boolean.FALSE
returned, or inclusion if Boolean.TRUE
is specified. If "unknown" case
(null
returned) behavior is to exclude property if global defaults
used; or to allow if explicit per-type or property merging is defined.
Default implementation returns null
to allow explicit per-type
or per-property attempts.
supportsUpdate
in class BeanDeserializerBase
public java.lang.Object deserialize(JsonParser p, DeserializationContext ctxt) throws java.io.IOException
deserialize
in class JsonDeserializer<java.lang.Object>
p
- Parsed used for reading JSON contentctxt
- Context that can be used to access information about
this deserialization activity.java.io.IOException
public java.lang.Object deserialize(JsonParser p, DeserializationContext ctxt, java.lang.Object value) throws java.io.IOException
deserialize
in class JsonDeserializer<java.lang.Object>
java.io.IOException
public java.lang.Object deserializeFromObject(JsonParser p, DeserializationContext ctxt) throws java.io.IOException
deserializeFromObject
in class BeanDeserializerBase
java.io.IOException
Copyright © 2010 - 2020 Adobe. All Rights Reserved