public class KeyValueMapDeserializer extends <any> implements MapLabels
Map
instance, with typed contents.
Note: for untyped content (one indicated by passing Object.class as the
type), UntypedObjectDeserializer
is used instead. It can also
construct Map
s, but not with specific POJO types, only
other containers and primitives/wrappers.
Modifier and Type | Field and Description |
---|---|
protected <any> |
_delegateDeserializer
Deserializer that is used iff delegate-based creator is to be used for
deserializing from JSON Object.
|
protected boolean |
_hasDefaultCreator |
protected java.util.HashSet<java.lang.String> |
_ignorableProperties |
protected <any> |
_keyDeserializer
Key deserializer to use; either passed via constructor (when indicated by
annotations), or resolved when
resolve(DeserializationContext) is called; |
protected JavaType |
_mapType |
protected PropertyBasedCreator |
_propertyBasedCreator
If the Map is to be instantiated using non-default constructor or factory
method that takes one or more named properties as argument(s), this
creator is used for instantiation.
|
protected boolean |
_standardStringKey
Flag set to indicate that the key type is
String (or
Object , for which String is acceptable), and
that the default Jackson key deserializer would be used. |
protected <any> |
_valueDeserializer
Value deserializer.
|
protected ValueInstantiator |
_valueInstantiator |
protected TypeDeserializer |
_valueTypeDeserializer
If value instances have polymorphic type information, this is the type
deserializer that can handle it
|
MAP_KEY_NAME, MAP_VALUE_NAME
Modifier | Constructor and Description |
---|---|
|
KeyValueMapDeserializer(JavaType mapType,
ValueInstantiator valueInstantiator,
<any> keyDeser,
<any> valueDeser,
TypeDeserializer valueTypeDeser) |
protected |
KeyValueMapDeserializer(KeyValueMapDeserializer src)
Copy-constructor that can be used by sub-classes to allow copy-on-write
styling copying of settings of an existing instance.
|
protected |
KeyValueMapDeserializer(KeyValueMapDeserializer src,
ValueInstantiator valueInstantiator,
<any> keyDeser,
<any> valueDeser,
TypeDeserializer valueTypeDeser,
java.util.HashSet<java.lang.String> ignorable) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Object,java.lang.Object> |
_deserializeUsingCreator(JsonParser jp,
DeserializationContext ctxt) |
protected boolean |
_isDefaultKeyDeserializer(<any> keyDeser) |
protected boolean |
_isStdKeyDeser(JavaType mapType,
<any> keyDeser)
Helper method used to check whether we can just use the default key
deserialization, where JSON String becomes Java String.
|
protected void |
_readAndBind(JsonParser jp,
DeserializationContext ctxt,
java.util.Map<java.lang.Object,java.lang.Object> result) |
protected void |
_readAndBindStringMap(JsonParser jp,
DeserializationContext ctxt,
java.util.Map<java.lang.Object,java.lang.Object> result)
Optimized method used when keys can be deserialized as plain old
String s, and there is no custom deserialized specified. |
<any> |
createContextual(DeserializationContext ctxt,
BeanProperty property)
Method called to finalize setup of this deserializer, when it is known
for which property deserializer is needed for.
|
java.util.Map<java.lang.Object,java.lang.Object> |
deserialize(JsonParser jp,
DeserializationContext ctxt) |
java.util.Map<java.lang.Object,java.lang.Object> |
deserialize(JsonParser jp,
DeserializationContext ctxt,
java.util.Map<java.lang.Object,java.lang.Object> result) |
java.lang.Object |
deserializeWithType(JsonParser jp,
DeserializationContext ctxt,
TypeDeserializer typeDeserializer) |
<any> |
getContentDeserializer() |
JavaType |
getContentType() |
java.lang.Class<?> |
getMapClass() |
JavaType |
getValueType() |
void |
resolve(DeserializationContext ctxt) |
void |
setIgnorableProperties(java.lang.String[] ignorable) |
protected KeyValueMapDeserializer |
withResolved(<any> keyDeser,
TypeDeserializer valueTypeDeser,
<any> valueDeser,
ValueInstantiator vi,
java.util.HashSet<java.lang.String> ignorable)
Fluent factory method used to create a copy with slightly different
settings.
|
protected void |
wrapAndThrow(java.lang.Throwable t,
java.lang.Object ref) |
protected final JavaType _mapType
protected final <any> _keyDeserializer
resolve(DeserializationContext)
is called;protected boolean _standardStringKey
String
(or
Object
, for which String is acceptable), and
that the default Jackson key deserializer would be used. If both are
true, can optimize handling.protected final <any> _valueDeserializer
protected final TypeDeserializer _valueTypeDeserializer
protected final ValueInstantiator _valueInstantiator
protected final boolean _hasDefaultCreator
protected <any> _delegateDeserializer
protected PropertyBasedCreator _propertyBasedCreator
protected java.util.HashSet<java.lang.String> _ignorableProperties
public KeyValueMapDeserializer(JavaType mapType, ValueInstantiator valueInstantiator, <any> keyDeser, <any> valueDeser, TypeDeserializer valueTypeDeser)
protected KeyValueMapDeserializer(KeyValueMapDeserializer src)
protected KeyValueMapDeserializer(KeyValueMapDeserializer src, ValueInstantiator valueInstantiator, <any> keyDeser, <any> valueDeser, TypeDeserializer valueTypeDeser, java.util.HashSet<java.lang.String> ignorable)
protected KeyValueMapDeserializer withResolved(<any> keyDeser, TypeDeserializer valueTypeDeser, <any> valueDeser, ValueInstantiator vi, java.util.HashSet<java.lang.String> ignorable)
protected final boolean _isStdKeyDeser(JavaType mapType, <any> keyDeser)
protected boolean _isDefaultKeyDeserializer(<any> keyDeser)
public void setIgnorableProperties(java.lang.String[] ignorable)
public void resolve(DeserializationContext ctxt) throws JsonMappingException
JsonMappingException
public <any> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException
JsonMappingException
public JavaType getContentType()
public <any> getContentDeserializer()
public java.util.Map<java.lang.Object,java.lang.Object> deserialize(JsonParser jp, DeserializationContext ctxt) throws java.io.IOException, JsonProcessingException
java.io.IOException
JsonProcessingException
public java.util.Map<java.lang.Object,java.lang.Object> deserialize(JsonParser jp, DeserializationContext ctxt, java.util.Map<java.lang.Object,java.lang.Object> result) throws java.io.IOException, JsonProcessingException
java.io.IOException
JsonProcessingException
public java.lang.Object deserializeWithType(JsonParser jp, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws java.io.IOException, JsonProcessingException
java.io.IOException
JsonProcessingException
public final java.lang.Class<?> getMapClass()
public JavaType getValueType()
protected final void _readAndBind(JsonParser jp, DeserializationContext ctxt, java.util.Map<java.lang.Object,java.lang.Object> result) throws java.io.IOException, JsonProcessingException
java.io.IOException
JsonProcessingException
protected final void _readAndBindStringMap(JsonParser jp, DeserializationContext ctxt, java.util.Map<java.lang.Object,java.lang.Object> result) throws java.io.IOException, JsonProcessingException
String
s, and there is no custom deserialized specified.java.io.IOException
JsonProcessingException
public java.util.Map<java.lang.Object,java.lang.Object> _deserializeUsingCreator(JsonParser jp, DeserializationContext ctxt) throws java.io.IOException, JsonProcessingException
java.io.IOException
JsonProcessingException
protected void wrapAndThrow(java.lang.Throwable t, java.lang.Object ref) throws java.io.IOException
java.io.IOException