java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<T>
com.fasterxml.jackson.datatype.pcollections.deser.PCollectionsMapDeserializer<T>
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.ContextualDeserializer
,com.fasterxml.jackson.databind.deser.NullValueProvider
- Direct Known Subclasses:
HashTreePMapDeserializer
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
com.fasterxml.jackson.databind.JsonDeserializer.None
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.fasterxml.jackson.databind.KeyDeserializer
Key deserializer used, if not null.protected final com.fasterxml.jackson.databind.type.MapType
protected final com.fasterxml.jackson.databind.jsontype.TypeDeserializer
If value instances have polymorphic type information, this is the type deserializer that can handle itprotected com.fasterxml.jackson.databind.JsonDeserializer
<?> Value deserializer. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
PCollectionsMapDeserializer
(com.fasterxml.jackson.databind.type.MapType type, com.fasterxml.jackson.databind.KeyDeserializer keyDeser, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> deser) -
Method Summary
Modifier and TypeMethodDescriptionprotected T
_deserializeEntries
(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) protected T
_handleNull
(com.fasterxml.jackson.databind.DeserializationContext ctxt, Object key, com.fasterxml.jackson.databind.JsonDeserializer<?> valueDeser, T map) Overridable helper method called when a JSON null value is encountered.com.fasterxml.jackson.databind.JsonDeserializer
<?> createContextual
(com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty property) Method called to finalize setup of this deserializer, after deserializer itself has been registered.protected abstract T
deserialize
(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) deserializeWithType
(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) Base implementation that does not assume specific type inclusion mechanism.com.fasterxml.jackson.databind.type.LogicalType
abstract PCollectionsMapDeserializer
<T> withResolved
(com.fasterxml.jackson.databind.KeyDeserializer keyDeser, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> valueDeser) Overridable fluent factory method used for creating contextual instances.Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
Field Details
-
_mapType
protected final com.fasterxml.jackson.databind.type.MapType _mapType -
_keyDeserializer
protected com.fasterxml.jackson.databind.KeyDeserializer _keyDeserializerKey deserializer used, if not null. If null, String from JSON content is used as is. -
_valueDeserializer
protected com.fasterxml.jackson.databind.JsonDeserializer<?> _valueDeserializerValue deserializer. -
_typeDeserializerForValue
protected final com.fasterxml.jackson.databind.jsontype.TypeDeserializer _typeDeserializerForValueIf value instances have polymorphic type information, this is the type deserializer that can handle it
-
-
Constructor Details
-
PCollectionsMapDeserializer
protected PCollectionsMapDeserializer(com.fasterxml.jackson.databind.type.MapType type, com.fasterxml.jackson.databind.KeyDeserializer keyDeser, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
-
-
Method Details
-
logicalType
public com.fasterxml.jackson.databind.type.LogicalType logicalType() -
withResolved
public abstract PCollectionsMapDeserializer<T> withResolved(com.fasterxml.jackson.databind.KeyDeserializer keyDeser, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> valueDeser) Overridable fluent factory method used for creating contextual instances. -
createContextual
public com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException Method called to finalize setup of this deserializer, after deserializer itself has been registered. This is needed to handle recursive and transitive dependencies.- Specified by:
createContextual
in interfacecom.fasterxml.jackson.databind.deser.ContextualDeserializer
- Throws:
com.fasterxml.jackson.databind.JsonMappingException
-
deserializeWithType
public Object deserializeWithType(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) throws IOException Base implementation that does not assume specific type inclusion mechanism. Sub-classes are expected to override this method if they are to handle type information.- Overrides:
deserializeWithType
in classcom.fasterxml.jackson.databind.JsonDeserializer<T extends org.pcollections.PMap<Object,
Object>> - Throws:
IOException
-
deserialize
public T deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException - Specified by:
deserialize
in classcom.fasterxml.jackson.databind.JsonDeserializer<T extends org.pcollections.PMap<Object,
Object>> - Throws:
IOException
-
createEmptyMap
-
_deserializeEntries
protected T _deserializeEntries(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException - Throws:
IOException
-
_handleNull
protected T _handleNull(com.fasterxml.jackson.databind.DeserializationContext ctxt, Object key, com.fasterxml.jackson.databind.JsonDeserializer<?> valueDeser, T map) throws IOException Overridable helper method called when a JSON null value is encountered. Since PCollections Maps typically do not allow null values, special handling is needed; default is to simply ignore and skip such values, but alternative could be to throw an exception.- Throws:
IOException
-