com.fasterxml.jackson.databind.exc
Class InvalidFormatException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.exc.InvalidFormatException
- All Implemented Interfaces:
- Serializable
public class InvalidFormatException
- extends JsonMappingException
Specialized sub-class of JsonMappingException
that is used when the underlying problem appears to be that
of bad formatting of a value to deserialize.
- Since:
- 2.1
- See Also:
- Serialized Form
Field Summary |
protected Class<?> |
_targetType
Intended target type (type-erased class) that value could not
be deserialized into, if known. |
protected Object |
_value
Underlying value that could not be deserialized into
target type, if available. |
Methods inherited from class com.fasterxml.jackson.databind.JsonMappingException |
_appendPathDesc, _buildMessage, from, from, fromUnexpectedIOE, getLocalizedMessage, getMessage, getPath, getPathReference, getPathReference, prependPath, prependPath, prependPath, toString, wrapWithPath, wrapWithPath, wrapWithPath |
_value
protected final Object _value
- Underlying value that could not be deserialized into
target type, if available.
_targetType
protected final Class<?> _targetType
- Intended target type (type-erased class) that value could not
be deserialized into, if known.
InvalidFormatException
public InvalidFormatException(String msg,
Object value,
Class<?> targetType)
InvalidFormatException
public InvalidFormatException(String msg,
JsonLocation loc,
Object value,
Class<?> targetType)
from
public static InvalidFormatException from(JsonParser jp,
String msg,
Object value,
Class<?> targetType)
getValue
public Object getValue()
- Accessor for checking source value (String, Number usually) that could not
be deserialized into target type (
getTargetType()
).
Note that value may not be available, depending on who throws the exception
and when.
getTargetType
public Class<?> getTargetType()
- Accessor for checking target type of value (
getValue()
that failed
to deserialize.
Note that type may not be available, depending on who throws the exception
and when.
Copyright © 2012 FasterXML. All Rights Reserved.