public abstract class DeserializationContext extends DatabindContext implements Serializable
 Instance life-cycle is such that a partially configured "blueprint" object
 is registered with ObjectMapper (and ObjectReader,
 and when actual instance is needed for deserialization,
 a fully configured instance will be created using a method in extended internal
  API of sub-class
 (DefaultDeserializationContext.createInstance(com.fasterxml.jackson.databind.DeserializationConfig, com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.InjectableValues)).
 Each instance is guaranteed to only be used from single-threaded context;
 instances may be reused if (and only if) no configuration has changed.
Defined as abstract class so that implementations must define methods for reconfiguring blueprints and creating instances.
| Modifier and Type | Field and Description | 
|---|---|
| protected ArrayBuilders | _arrayBuilders | 
| protected ContextAttributes | _attributesLazily-constructed holder for per-call attributes. | 
| protected DeserializerCache | _cacheObject that handle details of  JsonDeserializercaching. | 
| protected DeserializationConfig | _configGeneric deserialization processing configuration | 
| protected LinkedNode<JavaType> | _currentTypeType of  JsonDeserializer(or, more specifically,ContextualDeserializer) that is being
   contextualized currently. | 
| protected DateFormat | _dateFormat | 
| protected DeserializerFactory | _factoryRead-only factory instance; exposed to let
 owners ( ObjectMapper,ObjectReader)
 access it. | 
| protected int | _featureFlagsBitmap of  DeserializationFeatures that are enabled | 
| protected InjectableValues | _injectableValuesObject used for resolving references to injectable
 values. | 
| protected ObjectBuffer | _objectBuffer | 
| protected JsonParser | _parserCurrently active parser used for deserialization. | 
| protected Class<?> | _viewCurrently active view, if any. | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | DeserializationContext(DeserializationContext src)Copy-constructor for use with  copy()byObjectMapper.copy() | 
| protected  | DeserializationContext(DeserializationContext src,
                      DeserializationConfig config,
                      JsonParser p,
                      InjectableValues injectableValues)Constructor used for creating actual per-call instances. | 
| protected  | DeserializationContext(DeserializationContext src,
                      DeserializerFactory factory) | 
| protected  | DeserializationContext(DeserializerFactory df) | 
| protected  | DeserializationContext(DeserializerFactory df,
                      DeserializerCache cache) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected boolean | _isCompatible(Class<?> target,
             Object value) | 
| boolean | canOverrideAccessModifiers()Convenience method for accessing serialization view in use (if any); equivalent to: | 
| abstract void | checkUnresolvedObjectId()Method called to ensure that every object id encounter during processing
 are resolved. | 
| Calendar | constructCalendar(Date d)Convenience method for constructing Calendar instance set
 to specified time, to be modified and used by caller. | 
| JavaType | constructType(Class<?> cls)Convenience method, functionally equivalent to: | 
| abstract JsonDeserializer<Object> | deserializerInstance(Annotated annotated,
                    Object deserDef) | 
| JsonMappingException | endOfInputException(Class<?> instClass)Deprecated. 
 Since 2.8; currently no way to catch EOF at databind level | 
| Class<?> | findClass(String className)Helper method that is to be used when resolving basic class name into
 Class instance, the reason being that it may be necessary to work around
 various ClassLoader limitations, as well as to handle primitive type
 signatures. | 
| JsonDeserializer<Object> | findContextualValueDeserializer(JavaType type,
                               BeanProperty prop)Method for finding a value deserializer, and creating a contextual
 version if necessary, for value reached via specified property. | 
| Object | findInjectableValue(Object valueId,
                   BeanProperty forProperty,
                   Object beanInstance) | 
| KeyDeserializer | findKeyDeserializer(JavaType keyType,
                   BeanProperty prop)Convenience method, functionally same as: | 
| JsonDeserializer<Object> | findNonContextualValueDeserializer(JavaType type)Variant that will try to locate deserializer for current type, but without
 performing any contextualization (unlike  findContextualValueDeserializer(com.fasterxml.jackson.databind.JavaType, com.fasterxml.jackson.databind.BeanProperty))
 or checking for need to create aTypeDeserializer(unlikefindRootValueDeserializer(JavaType). | 
| abstract ReadableObjectId | findObjectId(Object id,
            ObjectIdGenerator<?> generator,
            ObjectIdResolver resolver)Method called to find and return entry corresponding to given
 Object Id: will add an entry if necessary, and never returns null | 
| JsonDeserializer<Object> | findRootValueDeserializer(JavaType type)Method for finding a deserializer for root-level value. | 
| Class<?> | getActiveView()Accessor for locating currently active view, if any;
 returns null if no view has been set. | 
| AnnotationIntrospector | getAnnotationIntrospector()Convenience method for accessing serialization view in use (if any); equivalent to: | 
| ArrayBuilders | getArrayBuilders()Method for accessing object useful for building arrays of
 primitive types (such as int[]). | 
| Object | getAttribute(Object key)Method for accessing attributes available in this context. | 
| Base64Variant | getBase64Variant()Convenience method for accessing the default Base64 encoding
 used for decoding base64 encoded binary content. | 
| DeserializationConfig | getConfig()Accessor to currently active configuration (both per-request configs
 and per-mapper config). | 
| JavaType | getContextualType()Accessor to  JavaTypeof currently contextualizedContextualDeserializer, if any. | 
| protected DateFormat | getDateFormat() | 
| JsonFormat.Value | getDefaultPropertyFormat(Class<?> baseType) | 
| int | getDeserializationFeatures()Bulk access method for getting the bit mask of all  DeserializationFeatures
 that are enabled. | 
| DeserializerFactory | getFactory()Method for getting current  DeserializerFactory. | 
| Locale | getLocale()Method for accessing default Locale to use: convenience method for | 
| JsonNodeFactory | getNodeFactory()Convenience method, functionally equivalent to: | 
| JsonParser | getParser()Method for accessing the currently active parser. | 
| TimeZone | getTimeZone()Method for accessing default TimeZone to use: convenience method for | 
| TypeFactory | getTypeFactory() | 
| void | handleBadMerge(JsonDeserializer<?> deser)Method that deserializer may call if it is called to do an update ("merge")
 but deserializer operates on a non-mergeable type. | 
| Object | handleInstantiationProblem(Class<?> instClass,
                          Object argument,
                          Throwable t)Method that deserializers should call if they fail to instantiate value
 due to an exception that was thrown by constructor (or other mechanism used
 to create instances). | 
| Object | handleMissingInstantiator(Class<?> instClass,
                         ValueInstantiator valueInst,
                         JsonParser p,
                         String msg,
                         Object... msgArgs)Method that deserializers should call if they fail to instantiate value
 due to lack of viable instantiator (usually creator, that is, constructor
 or static factory method). | 
| JavaType | handleMissingTypeId(JavaType baseType,
                   TypeIdResolver idResolver,
                   String extraDesc) | 
| JsonDeserializer<?> | handlePrimaryContextualization(JsonDeserializer<?> deser,
                              BeanProperty prop,
                              JavaType type)Method called for primary property deserializers (ones
 directly created to deserialize values of a POJO property),
 to handle details of resolving
  ContextualDeserializerwith given property context. | 
| JsonDeserializer<?> | handleSecondaryContextualization(JsonDeserializer<?> deser,
                                BeanProperty prop,
                                JavaType type)Method called for secondary property deserializers (ones
 NOT directly created to deal with an annotatable POJO property,
 but instead created as a component -- such as value deserializers
 for structured types, or deserializers for root values)
 to handle details of resolving
  ContextualDeserializerwith given property context. | 
| Object | handleUnexpectedToken(Class<?> instClass,
                     JsonParser p)Method that deserializers should call if the first token of the value to
 deserialize is of unexpected type (that is, type of token that deserializer
 cannot handle). | 
| Object | handleUnexpectedToken(Class<?> instClass,
                     JsonToken t,
                     JsonParser p,
                     String msg,
                     Object... msgArgs)Method that deserializers should call if the first token of the value to
 deserialize is of unexpected type (that is, type of token that deserializer
 cannot handle). | 
| Object | handleUnexpectedToken(JavaType targetType,
                     JsonParser p)Method that deserializers should call if the first token of the value to
 deserialize is of unexpected type (that is, type of token that deserializer
 cannot handle). | 
| Object | handleUnexpectedToken(JavaType targetType,
                     JsonToken t,
                     JsonParser p,
                     String msg,
                     Object... msgArgs)Method that deserializers should call if the first token of the value to
 deserialize is of unexpected type (that is, type of token that deserializer
 cannot handle). | 
| boolean | handleUnknownProperty(JsonParser p,
                     JsonDeserializer<?> deser,
                     Object instanceOrClass,
                     String propName)Method that deserializers should call if they encounter an unrecognized
 property (and once that is not explicitly designed as ignorable), to
 inform possibly configured  DeserializationProblemHandlers and
 let it handle the problem. | 
| JavaType | handleUnknownTypeId(JavaType baseType,
                   String id,
                   TypeIdResolver idResolver,
                   String extraDesc)Method that deserializers should call if they encounter a type id
 (for polymorphic deserialization) that cannot be resolved to an
 actual type; usually since there is no mapping defined. | 
| Object | handleWeirdKey(Class<?> keyClass,
              String keyValue,
              String msg,
              Object... msgArgs)Method that deserializers should call if they encounter a String value
 that cannot be converted to expected key of a  Mapvalued property. | 
| Object | handleWeirdNativeValue(JavaType targetType,
                      Object badValue,
                      JsonParser p) | 
| Object | handleWeirdNumberValue(Class<?> targetClass,
                      Number value,
                      String msg,
                      Object... msgArgs)Method that deserializers should call if they encounter a numeric value
 that cannot be converted to target property type, in cases where some
 numeric values could be acceptable (either with different settings,
 or different numeric value). | 
| Object | handleWeirdStringValue(Class<?> targetClass,
                      String value,
                      String msg,
                      Object... msgArgs)Method that deserializers should call if they encounter a String value
 that cannot be converted to target property type, in cases where some
 String values could be acceptable (either with different settings,
 or different value). | 
| boolean | hasDeserializationFeatures(int featureMask)Bulk access method for checking that all features specified by
 mask are enabled. | 
| boolean | hasSomeOfFeatures(int featureMask)Bulk access method for checking that at least one of features specified by
 mask is enabled. | 
| boolean | hasValueDeserializerFor(JavaType type,
                       AtomicReference<Throwable> cause)Method for checking whether we could find a deserializer
 for given type. | 
| JsonMappingException | instantiationException(Class<?> instClass,
                      String msg0)Helper method for constructing instantiation exception for specified type,
 to indicate that instantiation failed due to missing instantiator
 (creator; constructor or factory method). | 
| JsonMappingException | instantiationException(Class<?> instClass,
                      Throwable cause)Helper method for constructing instantiation exception for specified type,
 to indicate problem with physically constructing instance of
 specified class (missing constructor, exception from constructor) | 
| JsonMappingException | invalidTypeIdException(JavaType baseType,
                      String typeId,
                      String extraDesc)Helper method for constructing exception to indicate that given type id
 could not be resolved to a valid subtype of specified base type. | 
| boolean | isEnabled(DeserializationFeature feat)Convenience method for checking whether specified on/off
 feature is enabled | 
| boolean | isEnabled(MapperFeature feature)Convenience method for checking whether specified serialization
 feature is enabled or not. | 
| abstract KeyDeserializer | keyDeserializerInstance(Annotated annotated,
                       Object deserDef) | 
| ObjectBuffer | leaseObjectBuffer()Method that can be used to get access to a reusable ObjectBuffer,
 useful for efficiently constructing Object arrays and Lists. | 
| JsonMappingException | mappingException(Class<?> targetClass)Deprecated. 
 Since 2.8 use  handleUnexpectedToken(Class, JsonParser)instead | 
| JsonMappingException | mappingException(Class<?> targetClass,
                JsonToken token)Deprecated. 
 Since 2.8 use  handleUnexpectedToken(Class, JsonParser)instead | 
| JsonMappingException | mappingException(String message)Deprecated. 
 Since 2.9 use more specific error reporting methods instead | 
| JsonMappingException | mappingException(String msg,
                Object... msgArgs)Deprecated. 
 Since 2.9 use more specific error reporting methods instead | 
| JsonMappingException | missingTypeIdException(JavaType baseType,
                      String extraDesc) | 
| Date | parseDate(String dateStr)Convenience method for parsing a Date from given String, using
 currently configured date format (accessed using
  MapperConfig.getDateFormat()). | 
| <T> T | readPropertyValue(JsonParser p,
                 BeanProperty prop,
                 Class<T> type)Convenience method that may be used by composite or container deserializers,
 for reading one-off values for the composite type, taking into account
 annotations that the property (passed to this method -- usually property that
 has custom serializer that called this method) has. | 
| <T> T | readPropertyValue(JsonParser p,
                 BeanProperty prop,
                 JavaType type) | 
| JsonNode | readTree(JsonParser p) | 
| <T> T | readValue(JsonParser p,
         Class<T> type)Convenience method that may be used by composite or container deserializers,
 for reading one-off values contained (for sequences, it is more efficient
 to actually fetch deserializer once for the whole collection). | 
| <T> T | readValue(JsonParser p,
         JavaType type) | 
| <T> T | reportBadDefinition(JavaType type,
                   String msg)Helper method called to indicate a generic problem that stems from type
 definition(s), not input data, or input/output state; typically this
 means throwing a  InvalidDefinitionException. | 
| <T> T | reportBadMerge(JsonDeserializer<?> deser)Deprecated. 
 Since 2.10 use  handleBadMerge(com.fasterxml.jackson.databind.JsonDeserializer<?>)instead | 
| <T> T | reportBadPropertyDefinition(BeanDescription bean,
                           BeanPropertyDefinition prop,
                           String msg,
                           Object... msgArgs)Helper method called to indicate problem in POJO (serialization) definitions or settings
 regarding specific property (of a type), unrelated to actual JSON content to map. | 
| <T> T | reportBadTypeDefinition(BeanDescription bean,
                       String msg,
                       Object... msgArgs)Helper method called to indicate problem in POJO (serialization) definitions or settings
 regarding specific Java type, unrelated to actual JSON content to map. | 
| <T> T | reportInputMismatch(BeanProperty prop,
                   String msg,
                   Object... msgArgs)Helper method used to indicate a problem with input in cases where more
 specific  reportXxx()method was not available. | 
| <T> T | reportInputMismatch(Class<?> targetType,
                   String msg,
                   Object... msgArgs)Helper method used to indicate a problem with input in cases where more
 specific  reportXxx()method was not available. | 
| <T> T | reportInputMismatch(JavaType targetType,
                   String msg,
                   Object... msgArgs)Helper method used to indicate a problem with input in cases where more
 specific  reportXxx()method was not available. | 
| <T> T | reportInputMismatch(JsonDeserializer<?> src,
                   String msg,
                   Object... msgArgs)Helper method used to indicate a problem with input in cases where more
 specific  reportXxx()method was not available. | 
| void | reportMappingException(String msg,
                      Object... msgArgs)Deprecated. 
 Since 2.9: use a more specific method, or  reportBadDefinition(JavaType, String),
    orreportInputMismatch(com.fasterxml.jackson.databind.JsonDeserializer<?>, java.lang.String, java.lang.Object...)instead | 
| void | reportMissingContent(String msg,
                    Object... msgArgs)Deprecated. 
 Since 2.9: not clear this ever occurs | 
| <T> T | reportPropertyInputMismatch(Class<?> targetType,
                           String propertyName,
                           String msg,
                           Object... msgArgs)Helper method used to indicate a problem with input in cases where more
 specific  reportXxx()method was not available. | 
| <T> T | reportPropertyInputMismatch(JavaType targetType,
                           String propertyName,
                           String msg,
                           Object... msgArgs)Helper method used to indicate a problem with input in cases where more
 specific  reportXxx()method was not available. | 
| <T> T | reportTrailingTokens(Class<?> targetType,
                    JsonParser p,
                    JsonToken trailingToken) | 
| void | reportUnknownProperty(Object instanceOrClass,
                     String fieldName,
                     JsonDeserializer<?> deser) | 
| <T> T | reportUnresolvedObjectId(ObjectIdReader oidReader,
                        Object bean) | 
| void | reportWrongTokenException(Class<?> targetType,
                         JsonToken expToken,
                         String msg,
                         Object... msgArgs)Method for deserializers to call 
 when the token encountered was of type different than what should
 be seen at that position, usually within a sequence of expected tokens. | 
| void | reportWrongTokenException(JavaType targetType,
                         JsonToken expToken,
                         String msg,
                         Object... msgArgs)Method for deserializers to call 
 when the token encountered was of type different than what should
 be seen at that position, usually within a sequence of expected tokens. | 
| void | reportWrongTokenException(JsonDeserializer<?> deser,
                         JsonToken expToken,
                         String msg,
                         Object... msgArgs)Method for deserializers to call 
 when the token encountered was of type different than what should
 be seen at that position, usually within a sequence of expected tokens. | 
| void | reportWrongTokenException(JsonParser p,
                         JsonToken expToken,
                         String msg,
                         Object... msgArgs)Deprecated.  | 
| void | returnObjectBuffer(ObjectBuffer buf)Method to call to return object buffer previously leased with
  leaseObjectBuffer(). | 
| DeserializationContext | setAttribute(Object key,
            Object value)Method for setting per-call value of given attribute. | 
| JsonMappingException | unknownTypeException(JavaType type,
                    String id,
                    String extraDesc) | 
| JsonMappingException | weirdKeyException(Class<?> keyClass,
                 String keyValue,
                 String msg)Helper method for constructing exception to indicate that given JSON
 Object field name was not in format to be able to deserialize specified
 key type. | 
| JsonMappingException | weirdNativeValueException(Object value,
                         Class<?> instClass)Helper method for constructing exception to indicate that input JSON
 token of type "native value" (see  JsonToken.VALUE_EMBEDDED_OBJECT)
 is of incompatible type (and there is no delegating creator or such to use)
 and can not be used to construct value of specified type (usually POJO). | 
| JsonMappingException | weirdNumberException(Number value,
                    Class<?> instClass,
                    String msg)Helper method for constructing exception to indicate that input JSON
 Number was not suitable for deserializing into given target type. | 
| JsonMappingException | weirdStringException(String value,
                    Class<?> instClass,
                    String msgBase)Helper method for constructing exception to indicate that input JSON
 String was not suitable for deserializing into given target type. | 
| JsonMappingException | wrongTokenException(JsonParser p,
                   Class<?> targetType,
                   JsonToken expToken,
                   String extra) | 
| JsonMappingException | wrongTokenException(JsonParser p,
                   JavaType targetType,
                   JsonToken expToken,
                   String extra)Helper method for constructing  JsonMappingExceptionto indicate
 that the token encountered was of type different than what should
 be seen at that position, usually within a sequence of expected tokens. | 
| JsonMappingException | wrongTokenException(JsonParser p,
                   JsonToken expToken,
                   String msg)Deprecated.  | 
_colonConcat, _desc, _format, _quotedString, _throwNotASubtype, _throwSubtypeClassNotAllowed, _throwSubtypeNameNotAllowed, _truncate, constructSpecializedType, constructType, converterInstance, objectIdGeneratorInstance, objectIdResolverInstance, reportBadDefinition, resolveAndValidateSubType, resolveSubTypeprotected final DeserializerCache _cache
JsonDeserializer caching.protected final DeserializerFactory _factory
ObjectMapper, ObjectReader)
 access it.protected final DeserializationConfig _config
protected final int _featureFlags
DeserializationFeatures that are enabledprotected final Class<?> _view
protected transient JsonParser _parser
protected final InjectableValues _injectableValues
protected transient ArrayBuilders _arrayBuilders
protected transient ObjectBuffer _objectBuffer
protected transient DateFormat _dateFormat
protected transient ContextAttributes _attributes
protected LinkedNode<JavaType> _currentType
JsonDeserializer (or, more specifically,
   ContextualDeserializer) that is being
   contextualized currently.protected DeserializationContext(DeserializerFactory df)
protected DeserializationContext(DeserializerFactory df, DeserializerCache cache)
protected DeserializationContext(DeserializationContext src, DeserializerFactory factory)
protected DeserializationContext(DeserializationContext src, DeserializationConfig config, JsonParser p, InjectableValues injectableValues)
protected DeserializationContext(DeserializationContext src)
copy() by ObjectMapper.copy()public DeserializationConfig getConfig()
DatabindContextgetConfig in class DatabindContextpublic final Class<?> getActiveView()
DatabindContextgetActiveView in class DatabindContextpublic final boolean canOverrideAccessModifiers()
DatabindContextgetConfig().canOverrideAccessModifiers();
canOverrideAccessModifiers in class DatabindContextpublic final boolean isEnabled(MapperFeature feature)
DatabindContextgetConfig().isEnabled(feature);
isEnabled in class DatabindContextpublic final JsonFormat.Value getDefaultPropertyFormat(Class<?> baseType)
getDefaultPropertyFormat in class DatabindContextpublic final AnnotationIntrospector getAnnotationIntrospector()
DatabindContextgetConfig().getAnnotationIntrospector();
getAnnotationIntrospector in class DatabindContextpublic final TypeFactory getTypeFactory()
getTypeFactory in class DatabindContextpublic Locale getLocale()
getConfig().getLocale();
getLocale in class DatabindContextpublic TimeZone getTimeZone()
getConfig().getTimeZone();
getTimeZone in class DatabindContextpublic Object getAttribute(Object key)
DatabindContextObjectReader or ObjectWriter have lower
 precedence.getAttribute in class DatabindContextkey - Key of the attribute to getpublic DeserializationContext setAttribute(Object key, Object value)
DatabindContextsetAttribute in class DatabindContextkey - Key of the attribute to setvalue - Value to set attribute topublic JavaType getContextualType()
JavaType of currently contextualized
 ContextualDeserializer, if any.
 This is sometimes useful for generic JsonDeserializers that
 do not get passed (or do not retain) type information when being
 constructed: happens for example for deserializers constructed
 from annotations.ContextualDeserializer being contextualized,
   if process is on-going; null if not.public DeserializerFactory getFactory()
DeserializerFactory.public final boolean isEnabled(DeserializationFeature feat)
public final int getDeserializationFeatures()
DeserializationFeatures
 that are enabled.public final boolean hasDeserializationFeatures(int featureMask)
public final boolean hasSomeOfFeatures(int featureMask)
public final JsonParser getParser()
Use of this method is discouraged: if code has direct access to the active parser, that should be used instead.
public final Object findInjectableValue(Object valueId, BeanProperty forProperty, Object beanInstance) throws JsonMappingException
JsonMappingExceptionpublic final Base64Variant getBase64Variant()
getConfig().getBase64Variant();
public final JsonNodeFactory getNodeFactory()
getConfig().getNodeFactory();
public boolean hasValueDeserializerFor(JavaType type, AtomicReference<Throwable> cause)
type - public final JsonDeserializer<Object> findContextualValueDeserializer(JavaType type, BeanProperty prop) throws JsonMappingException
JsonMappingExceptionpublic final JsonDeserializer<Object> findNonContextualValueDeserializer(JavaType type) throws JsonMappingException
findContextualValueDeserializer(com.fasterxml.jackson.databind.JavaType, com.fasterxml.jackson.databind.BeanProperty))
 or checking for need to create a TypeDeserializer (unlike
 findRootValueDeserializer(JavaType).
 This method is usually called from within ResolvableDeserializer.resolve(com.fasterxml.jackson.databind.DeserializationContext),
 and expectation is that caller then calls either
 handlePrimaryContextualization(JsonDeserializer, BeanProperty, JavaType) or
 handleSecondaryContextualization(JsonDeserializer, BeanProperty, JavaType) at a
 later point, as necessary.JsonMappingExceptionpublic final JsonDeserializer<Object> findRootValueDeserializer(JavaType type) throws JsonMappingException
JsonMappingExceptionpublic final KeyDeserializer findKeyDeserializer(JavaType keyType, BeanProperty prop) throws JsonMappingException
getDeserializerProvider().findKeyDeserializer(getConfig(), prop.getType(), prop);
JsonMappingExceptionpublic abstract ReadableObjectId findObjectId(Object id, ObjectIdGenerator<?> generator, ObjectIdResolver resolver)
public abstract void checkUnresolvedObjectId()
                                      throws UnresolvedForwardReference
UnresolvedForwardReferencepublic final JavaType constructType(Class<?> cls)
getConfig().constructType(cls);
public Class<?> findClass(String className) throws ClassNotFoundException
ClassNotFoundExceptionpublic final ObjectBuffer leaseObjectBuffer()
public final void returnObjectBuffer(ObjectBuffer buf)
leaseObjectBuffer().buf - Returned object bufferpublic final ArrayBuilders getArrayBuilders()
public abstract JsonDeserializer<Object> deserializerInstance(Annotated annotated, Object deserDef) throws JsonMappingException
JsonMappingExceptionpublic abstract KeyDeserializer keyDeserializerInstance(Annotated annotated, Object deserDef) throws JsonMappingException
JsonMappingExceptionpublic JsonDeserializer<?> handlePrimaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException
ContextualDeserializer with given property context.prop - Property for which the given primary deserializer is used; never null.JsonMappingExceptionpublic JsonDeserializer<?> handleSecondaryContextualization(JsonDeserializer<?> deser, BeanProperty prop, JavaType type) throws JsonMappingException
ContextualDeserializer with given property context.
 Given that these deserializers are not directly related to given property
 (or, in case of root value property, to any property), annotations
 accessible may or may not be relevant.prop - Property for which deserializer is used, if any; null
    when deserializing root valuesJsonMappingExceptionpublic Date parseDate(String dateStr) throws IllegalArgumentException
MapperConfig.getDateFormat()).
Implementation will handle thread-safety issues related to date formats such that first time this method is called, date format is cloned, and cloned instance will be retained for use during this deserialization round.
IllegalArgumentExceptionpublic Calendar constructCalendar(Date d)
public <T> T readValue(JsonParser p, Class<T> type) throws IOException
 NOTE: when deserializing values of properties contained in composite types,
 rather use readPropertyValue(JsonParser, BeanProperty, Class);
 this method does not allow use of contextual annotations.
IOExceptionpublic <T> T readValue(JsonParser p, JavaType type) throws IOException
IOExceptionpublic <T> T readPropertyValue(JsonParser p, BeanProperty prop, Class<T> type) throws IOException
IOExceptionpublic <T> T readPropertyValue(JsonParser p, BeanProperty prop, JavaType type) throws IOException
IOExceptionpublic JsonNode readTree(JsonParser p) throws IOException
IOExceptionpublic boolean handleUnknownProperty(JsonParser p, JsonDeserializer<?> deser, Object instanceOrClass, String propName) throws IOException
DeserializationProblemHandlers and
 let it handle the problem.IOExceptionpublic Object handleWeirdKey(Class<?> keyClass, String keyValue, String msg, Object... msgArgs) throws IOException
Map
 valued property.
 Default implementation will try to call DeserializationProblemHandler.handleWeirdNumberValue(com.fasterxml.jackson.databind.DeserializationContext, java.lang.Class<?>, java.lang.Number, java.lang.String)
 on configured handlers, if any, to allow for recovery; if recovery does not
 succeed, will throw InvalidFormatException with given message.keyClass - Expected type for keykeyValue - String value from which to deserialize keymsg - Error message template caller wants to use if exception is to be thrownmsgArgs - Optional arguments to use for message, if anyIOException - To indicate unrecoverable problem, usually based on msgpublic Object handleWeirdStringValue(Class<?> targetClass, String value, String msg, Object... msgArgs) throws IOException
DeserializationProblemHandler.handleWeirdStringValue(com.fasterxml.jackson.databind.DeserializationContext, java.lang.Class<?>, java.lang.String, java.lang.String)
 on configured handlers, if any, to allow for recovery; if recovery does not
 succeed, will throw InvalidFormatException with given message.targetClass - Type of property into which incoming number should be convertedvalue - String value from which to deserialize property valuemsg - Error message template caller wants to use if exception is to be thrownmsgArgs - Optional arguments to use for message, if anyIOException - To indicate unrecoverable problem, usually based on msgpublic Object handleWeirdNumberValue(Class<?> targetClass, Number value, String msg, Object... msgArgs) throws IOException
DeserializationProblemHandler.handleWeirdNumberValue(com.fasterxml.jackson.databind.DeserializationContext, java.lang.Class<?>, java.lang.Number, java.lang.String)
 on configured handlers, if any, to allow for recovery; if recovery does not
 succeed, will throw InvalidFormatException with given message.targetClass - Type of property into which incoming number should be convertedvalue - Number value from which to deserialize property valuemsg - Error message template caller wants to use if exception is to be thrownmsgArgs - Optional arguments to use for message, if anyIOException - To indicate unrecoverable problem, usually based on msgpublic Object handleWeirdNativeValue(JavaType targetType, Object badValue, JsonParser p) throws IOException
IOExceptionpublic Object handleMissingInstantiator(Class<?> instClass, ValueInstantiator valueInst, JsonParser p, String msg, Object... msgArgs) throws IOException
instClass - Type that was to be instantiatedvalueInst - (optional) Value instantiator to be used, if any; null if type does not
    use one for instantiation (custom deserialiers don't; standard POJO deserializer does)p - Parser that points to the JSON value to decodeinstClassIOExceptionValueInstantiator)public Object handleInstantiationProblem(Class<?> instClass, Object argument, Throwable t) throws IOException
DeserializationProblemHandler.handleInstantiationProblem(com.fasterxml.jackson.databind.DeserializationContext, java.lang.Class<?>, java.lang.Object, java.lang.Throwable)
 on configured handlers, if any, to allow for recovery; if recovery does not
 succeed, will throw exception constructed with instantiationException(java.lang.Class<?>, java.lang.Throwable).instClass - Type that was to be instantiatedargument - (optional) Argument that was passed to constructor or equivalent
    instantiator; often a String.t - Exception that caused failureinstClassIOExceptionpublic Object handleUnexpectedToken(Class<?> instClass, JsonParser p) throws IOException
JsonToken.START_ARRAY instead of
 JsonToken.VALUE_NUMBER_INT or JsonToken.VALUE_NUMBER_FLOAT.instClass - Type that was to be instantiatedp - Parser that points to the JSON value to decodeinstClassIOExceptionpublic Object handleUnexpectedToken(Class<?> instClass, JsonToken t, JsonParser p, String msg, Object... msgArgs) throws IOException
JsonToken.START_ARRAY instead of
 JsonToken.VALUE_NUMBER_INT or JsonToken.VALUE_NUMBER_FLOAT.instClass - Type that was to be instantiatedt - Token encountered that does match expectedp - Parser that points to the JSON value to decodeinstClassIOExceptionpublic Object handleUnexpectedToken(JavaType targetType, JsonParser p) throws IOException
JsonToken.START_ARRAY instead of
 JsonToken.VALUE_NUMBER_INT or JsonToken.VALUE_NUMBER_FLOAT.targetType - Type that was to be instantiatedp - Parser that points to the JSON value to decodeinstClassIOExceptionpublic Object handleUnexpectedToken(JavaType targetType, JsonToken t, JsonParser p, String msg, Object... msgArgs) throws IOException
JsonToken.START_ARRAY instead of
 JsonToken.VALUE_NUMBER_INT or JsonToken.VALUE_NUMBER_FLOAT.targetType - Type that was to be instantiatedt - Token encountered that does match expectedp - Parser that points to the JSON value to decodeinstClassIOExceptionpublic JavaType handleUnknownTypeId(JavaType baseType, String id, TypeIdResolver idResolver, String extraDesc) throws IOException
DeserializationProblemHandler.handleUnknownTypeId(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.JavaType, java.lang.String, com.fasterxml.jackson.databind.jsontype.TypeIdResolver, java.lang.String)
 on configured handlers, if any, to allow for recovery; if recovery does not
 succeed, will throw exception constructed with invalidTypeIdException(com.fasterxml.jackson.databind.JavaType, java.lang.String, java.lang.String).baseType - Base type from which resolution startsid - Type id that could not be convertedextraDesc - Additional problem description to add to default exception message,
    if resolution fails.JavaType that id resolves toIOException - To indicate unrecoverable problem, if resolution cannot
    be made to workpublic JavaType handleMissingTypeId(JavaType baseType, TypeIdResolver idResolver, String extraDesc) throws IOException
IOExceptionpublic void handleBadMerge(JsonDeserializer<?> deser) throws JsonMappingException
MapperFeature.IGNORE_MERGE_FOR_UNMERGEABLE is enabled,
 this method will simply return null; otherwise InvalidDefinitionException
 will be thrown.JsonMappingExceptionpublic void reportWrongTokenException(JsonDeserializer<?> deser, JsonToken expToken, String msg, Object... msgArgs) throws JsonMappingException
JsonMappingException and no
 recovery is attempted (via DeserializationProblemHandler, as
 problem is considered to be difficult to recover from, in general.JsonMappingExceptionpublic void reportWrongTokenException(JavaType targetType, JsonToken expToken, String msg, Object... msgArgs) throws JsonMappingException
JsonMappingException and no
 recovery is attempted (via DeserializationProblemHandler, as
 problem is considered to be difficult to recover from, in general.JsonMappingExceptionpublic void reportWrongTokenException(Class<?> targetType, JsonToken expToken, String msg, Object... msgArgs) throws JsonMappingException
JsonMappingException and no
 recovery is attempted (via DeserializationProblemHandler, as
 problem is considered to be difficult to recover from, in general.JsonMappingExceptionpublic <T> T reportUnresolvedObjectId(ObjectIdReader oidReader, Object bean) throws JsonMappingException
JsonMappingExceptionpublic <T> T reportInputMismatch(JsonDeserializer<?> src, String msg, Object... msgArgs) throws JsonMappingException
reportXxx() method was not available.JsonMappingExceptionpublic <T> T reportInputMismatch(Class<?> targetType, String msg, Object... msgArgs) throws JsonMappingException
reportXxx() method was not available.JsonMappingExceptionpublic <T> T reportInputMismatch(JavaType targetType, String msg, Object... msgArgs) throws JsonMappingException
reportXxx() method was not available.JsonMappingExceptionpublic <T> T reportInputMismatch(BeanProperty prop, String msg, Object... msgArgs) throws JsonMappingException
reportXxx() method was not available.JsonMappingExceptionpublic <T> T reportPropertyInputMismatch(Class<?> targetType, String propertyName, String msg, Object... msgArgs) throws JsonMappingException
reportXxx() method was not available.JsonMappingExceptionpublic <T> T reportPropertyInputMismatch(JavaType targetType, String propertyName, String msg, Object... msgArgs) throws JsonMappingException
reportXxx() method was not available.JsonMappingExceptionpublic <T> T reportTrailingTokens(Class<?> targetType, JsonParser p, JsonToken trailingToken) throws JsonMappingException
JsonMappingException@Deprecated public void reportWrongTokenException(JsonParser p, JsonToken expToken, String msg, Object... msgArgs) throws JsonMappingException
JsonMappingException@Deprecated public void reportUnknownProperty(Object instanceOrClass, String fieldName, JsonDeserializer<?> deser) throws JsonMappingException
handleUnknownProperty(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.JsonDeserializer<?>, java.lang.Object, java.lang.String) insteadinstanceOrClass - Either value being populated (if one has been
   instantiated), or Class that indicates type that would be (or
   have been) instantiateddeser - Deserializer that had the problem, if called by deserializer
   (or on behalf of one)JsonMappingException@Deprecated public void reportMissingContent(String msg, Object... msgArgs) throws JsonMappingException
JsonMappingExceptionpublic <T> T reportBadTypeDefinition(BeanDescription bean, String msg, Object... msgArgs) throws JsonMappingException
JsonMappingException.JsonMappingExceptionpublic <T> T reportBadPropertyDefinition(BeanDescription bean, BeanPropertyDefinition prop, String msg, Object... msgArgs) throws JsonMappingException
JsonMappingException.JsonMappingExceptionpublic <T> T reportBadDefinition(JavaType type, String msg) throws JsonMappingException
DatabindContextInvalidDefinitionException.reportBadDefinition in class DatabindContextJsonMappingException@Deprecated public <T> T reportBadMerge(JsonDeserializer<?> deser) throws JsonMappingException
handleBadMerge(com.fasterxml.jackson.databind.JsonDeserializer<?>) insteadJsonMappingExceptionpublic JsonMappingException wrongTokenException(JsonParser p, JavaType targetType, JsonToken expToken, String extra)
JsonMappingException to indicate
 that the token encountered was of type different than what should
 be seen at that position, usually within a sequence of expected tokens.
 Note that most of the time this method should NOT be directly called;
 instead, reportWrongTokenException(com.fasterxml.jackson.databind.JsonDeserializer<?>, com.fasterxml.jackson.core.JsonToken, java.lang.String, java.lang.Object...) should be called and will
 call this method as necessary.public JsonMappingException wrongTokenException(JsonParser p, Class<?> targetType, JsonToken expToken, String extra)
@Deprecated public JsonMappingException wrongTokenException(JsonParser p, JsonToken expToken, String msg)
public JsonMappingException weirdKeyException(Class<?> keyClass, String keyValue, String msg)
handleWeirdKey(java.lang.Class<?>, java.lang.String, java.lang.String, java.lang.Object...) should be called which will call this method
 if necessary.public JsonMappingException weirdStringException(String value, Class<?> instClass, String msgBase)
handleWeirdStringValue(java.lang.Class<?>, java.lang.String, java.lang.String, java.lang.Object...) should be called which will call this method
 if necessary.value - String value from input being deserializedinstClass - Type that String should be deserialized intomsgBase - Message that describes specific problempublic JsonMappingException weirdNumberException(Number value, Class<?> instClass, String msg)
handleWeirdNumberValue(java.lang.Class<?>, java.lang.Number, java.lang.String, java.lang.Object...) should be called which will call this method
 if necessary.public JsonMappingException weirdNativeValueException(Object value, Class<?> instClass)
JsonToken.VALUE_EMBEDDED_OBJECT)
 is of incompatible type (and there is no delegating creator or such to use)
 and can not be used to construct value of specified type (usually POJO).
 Note that most of the time this method should NOT be called; instead,
 handleWeirdNativeValue(com.fasterxml.jackson.databind.JavaType, java.lang.Object, com.fasterxml.jackson.core.JsonParser) should be called which will call this methodpublic JsonMappingException instantiationException(Class<?> instClass, Throwable cause)
 Note that most of the time this method should NOT be called directly; instead,
 handleInstantiationProblem(java.lang.Class<?>, java.lang.Object, java.lang.Throwable) should be called which will call this method
 if necessary.
public JsonMappingException instantiationException(Class<?> instClass, String msg0)
 Note that most of the time this method should NOT be called; instead,
 handleMissingInstantiator(java.lang.Class<?>, com.fasterxml.jackson.databind.deser.ValueInstantiator, com.fasterxml.jackson.core.JsonParser, java.lang.String, java.lang.Object...) should be called which will call this method
 if necessary.
public JsonMappingException invalidTypeIdException(JavaType baseType, String typeId, String extraDesc)
DatabindContext
 Note that most of the time this method should NOT be called directly: instead,
 method handleUnknownTypeId() should be called which will call this method
 if necessary.
invalidTypeIdException in class DatabindContextpublic JsonMappingException missingTypeIdException(JavaType baseType, String extraDesc)
@Deprecated public JsonMappingException unknownTypeException(JavaType type, String id, String extraDesc)
handleUnknownTypeId(com.fasterxml.jackson.databind.JavaType, java.lang.String, com.fasterxml.jackson.databind.jsontype.TypeIdResolver, java.lang.String) instead@Deprecated public JsonMappingException endOfInputException(Class<?> instClass)
@Deprecated public void reportMappingException(String msg, Object... msgArgs) throws JsonMappingException
reportBadDefinition(JavaType, String),
    or reportInputMismatch(com.fasterxml.jackson.databind.JsonDeserializer<?>, java.lang.String, java.lang.Object...) insteadreportXxx
 is applicable -- but only in that case.JsonMappingException@Deprecated public JsonMappingException mappingException(String message)
handleXxx methods, or reportMappingException(String, Object...)
 instead.@Deprecated public JsonMappingException mappingException(String msg, Object... msgArgs)
handleXxx methods, or reportMappingException(String, Object...)
 instead.@Deprecated public JsonMappingException mappingException(Class<?> targetClass)
handleUnexpectedToken(Class, JsonParser) instead@Deprecated public JsonMappingException mappingException(Class<?> targetClass, JsonToken token)
handleUnexpectedToken(Class, JsonParser) insteadprotected DateFormat getDateFormat()
Copyright © 2008–2019 FasterXML. All rights reserved.