T
- Type of deserializer to contextualizepublic interface ContextualDeserializer<T>
JsonDeserializer
s can implement to get a callback
that can be used to create contextual instances of deserializer to use for
handling properties of supported type. This can be useful
for deserializers that can be configured by annotations, or should otherwise
have differing behavior depending on what kind of property is being deserialized.Modifier and Type | Method and Description |
---|---|
JsonDeserializer<T> |
createContextual(DeserializationConfig config,
BeanProperty property)
Method called to see if a different (or differently configured) deserializer
is needed to deserialize values of specified property.
|
JsonDeserializer<T> createContextual(DeserializationConfig config, BeanProperty property) throws JsonMappingException
config
- Current deserialization configurationproperty
- 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 can not provide it and
null is passed instead (in which case impls usually pass 'this' deserializer as is)JsonMappingException