Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.databind.deser.std

public Class UntypedObjectDeserializer

extends StdDeserializer<Object>
implements ResolvableDeserializer, ContextualDeserializer
Class Inheritance
All Implemented Interfaces
com.fasterxml.jackson.databind.deser.ContextualDeserializer, com.fasterxml.jackson.databind.deser.ResolvableDeserializer
Annotations
@JacksonStdImpl
Imports
java.io.IOException, java.util.*, com.fasterxml.jackson.core.*, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.annotation.JacksonStdImpl, com.fasterxml.jackson.databind.deser.ContextualDeserializer, .ResolvableDeserializer, com.fasterxml.jackson.databind.jsontype.TypeDeserializer, com.fasterxml.jackson.databind.type.LogicalType, .TypeFactory, com.fasterxml.jackson.databind.util.ClassUtil, .ObjectBuffer

Deserializer implementation that is used if it is necessary to bind content of "unknown" type; something declared as basic java.lang.Object (either explicitly, or due to type erasure). If so, "natural" mapping is used to convert JSON values to their natural Java object matches: JSON arrays to Java java.util.Lists (or, if configured, Object[]), JSON objects to java.util.Maps, numbers to java.lang.Numbers, booleans to java.lang.Booleans and strings to java.lang.String (and nulls to nulls).

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
UntypedObjectDeserializer.Vanilla

Deprecated
Streamlined version of UntypedObjectDeserializer that has fewer checks and is only used when no custom deserializer overrides are applied.

Field Summary

Modifier and TypeField and Description
protected JsonDeserializer<Object>
protected JavaType
_listType

If java.util.List has been mapped to non-default implementation, we'll store type here

protected JsonDeserializer<Object>
protected JavaType
_mapType

If java.util.Map has been mapped to non-default implementation, we'll store type here

protected final boolean
protected JsonDeserializer<Object>
protected JsonDeserializer<Object>
protected static final Object[]
private static final long
Inherited from com.fasterxml.jackson.databind.deser.std.StdDeserializer:
_valueClass_valueTypeF_MASK_ACCEPT_ARRAYSF_MASK_INT_COERCIONS

Constructor Summary

AccessConstructor and Description
public
UntypedObjectDeserializer()

Deprecated Since 2.6 use variant takes type arguments
public
public
protected

Method Summary

Modifier and TypeMethod and Description
protected JsonDeserializer<Object>
protected JsonDeserializer<Object>
protected Object
_mapObjectWithDups(JsonParser p, DeserializationContext ctxt, final Map<String, Object> result, String key, Object oldValue, Object newValue, String nextKey)

private void
_squashDups(final Map<String, Object> result, String key, Object oldValue, Object newValue)

public JsonDeserializer<?>
createContextual(DeserializationContext
Deserialization context to access configuration, additional deserializers that may be needed by this deserializer
ctxt
,
BeanProperty
Method, field or constructor parameter that represents the property (and is used to assign deserialized value). Should be available; but there may be cases where caller cannot provide it and null is passed instead (in which case impls usually pass 'this' deserializer as is)
property
)

Implements com.fasterxml.jackson.databind.deser.ContextualDeserializer.createContextual.

We only use contextualization for optimizing the case where no customization occurred; if so, can slip in a more streamlined version.
public Object
deserialize(JsonParser
Parsed used for reading JSON content
p
,
DeserializationContext
Context that can be used to access information about this deserialization activity.
ctxt
)

Implements abstract com.fasterxml.jackson.databind.JsonDeserializer.deserialize.

Method that can be called to ask implementation to deserialize JSON content into the value type this serializer handles.
public Object
deserialize(JsonParser p, DeserializationContext ctxt, Object intoValue)

Overrides com.fasterxml.jackson.databind.JsonDeserializer.deserialize.

Alternate deserialization method (compared to the most commonly used, deserialize(JsonParser, DeserializationContext)), which takes in initialized value instance, to be configured and/or populated by deserializer.
public Object
deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer
Deserializer to use for handling type information
typeDeserializer
)

Overrides com.fasterxml.jackson.databind.deser.std.StdDeserializer.deserializeWithType.

Base implementation that does not assume specific type inclusion mechanism.
public boolean
isCachable()

Overrides com.fasterxml.jackson.databind.JsonDeserializer.isCachable.

Method called to see if deserializer instance is cachable and usable for other properties of same type (type for which instance was created).
public LogicalType
logicalType()

Overrides com.fasterxml.jackson.databind.JsonDeserializer.logicalType.

Method for accessing logical type of values this deserializer produces.
protected Object
mapArray(JsonParser p, DeserializationContext ctxt)

Method called to map a JSON Array into a Java value.

protected Object
protected Object[]
mapArrayToArray(JsonParser p, DeserializationContext ctxt)

Method called to map a JSON Array into a Java Object array (Object[]).

protected Object
mapObject(JsonParser p, DeserializationContext ctxt)

Method called to map a JSON Object into a Java value.

protected Object
public void
resolve(DeserializationContext
Context to use for accessing configuration, resolving secondary deserializers
ctxt
)

Implements com.fasterxml.jackson.databind.deser.ResolvableDeserializer.resolve.

We need to implement this method to properly find things to delegate to: it cannot be done earlier since delegated deserializers almost certainly require access to this instance (at least "List" and "Map" ones)
public Boolean
supportsUpdate(DeserializationConfig config)

Overrides com.fasterxml.jackson.databind.JsonDeserializer.supportsUpdate.

Introspection method that may be called to see whether deserializer supports update of an existing value (aka "merging") or not.
Inherited from com.fasterxml.jackson.databind.deser.std.StdDeserializer:
_byteOverflow_checkBooleanToStringCoercion_checkCoercionFail_checkDoubleSpecialValue_checkFloatSpecialValue_checkFloatToIntCoercion_checkFloatToStringCoercion_checkFromStringCoercion_checkFromStringCoercion_checkIntToFloatCoercion_checkIntToStringCoercion_checkTextualNull_checkToStringCoercion_coerceBooleanFromInt_coercedTypeDesc_coercedTypeDesc_coerceEmptyString_coerceIntegral_coerceNullToken_coerceTextualNull_deserializeFromArray_deserializeFromEmpty_deserializeFromEmptyString_deserializeFromString_deserializeWrappedValue_failDoubleToIntCoercion_findCoercionFromBlankString_findCoercionFromEmptyArray_findCoercionFromEmptyString_findNullProvider_hasTextualNull_intOverflow_isBlank_isEmptyOrTextualNull_isFalse_isIntNumber_isNaN_isNegInf_isPosInf_isTrue_neitherNull_nonNullNumber_parseBoolean_parseBooleanFromInt_parseBooleanPrimitive_parseBooleanPrimitive_parseBytePrimitive_parseDate_parseDate_parseDateFromArray_parseDouble_parseDouble_parseDoublePrimitive_parseDoublePrimitive_parseDoublePrimitive_parseFloatPrimitive_parseFloatPrimitive_parseFloatPrimitive_parseInteger_parseInteger_parseIntPrimitive_parseIntPrimitive_parseLong_parseLong_parseLongPrimitive_parseLongPrimitive_parseShortPrimitive_parseString_parseString_reportFailedNullCoerce_shortOverflow_verifyEndArrayForSingle_verifyNullForPrimitive_verifyNullForPrimitiveCoercion_verifyNullForScalarCoercion_verifyNumberForScalarCoercion_verifyStringForScalarCoercionfindContentNullProviderfindContentNullStylefindConvertingContentDeserializerfindDeserializerfindFormatFeaturefindFormatOverridesfindValueNullProvidergetValueClassgetValueInstantiatorgetValueTypegetValueTypehandledTypehandleMissingEndArrayForSinglehandleNestedArrayForSinglehandleUnknownPropertyisDefaultDeserializerisDefaultKeyDeserializer