public class InvalidFormatException extends JsonMappingException
JsonMappingException
that is used when the underlying problem appears to be that
of bad formatting of a value to deserialize.JsonMappingException.Reference
Modifier and Type | Field and Description |
---|---|
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.
|
_path
_location
Constructor and Description |
---|
InvalidFormatException(String msg,
JsonLocation loc,
Object value,
Class<?> targetType) |
InvalidFormatException(String msg,
Object value,
Class<?> targetType) |
Modifier and Type | Method and Description |
---|---|
static InvalidFormatException |
from(JsonParser jp,
String msg,
Object value,
Class<?> targetType) |
Class<?> |
getTargetType()
Accessor for checking target type of value (
getValue() that failed
to deserialize. |
Object |
getValue()
Accessor for checking source value (String, Number usually) that could not
be deserialized into target type (
getTargetType() ). |
_appendPathDesc, _buildMessage, from, from, fromUnexpectedIOE, getLocalizedMessage, getMessage, getPath, getPathReference, getPathReference, prependPath, prependPath, prependPath, toString, wrapWithPath, wrapWithPath, wrapWithPath
getLocation, getMessageSuffix, getOriginalMessage
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
protected final Object _value
protected final Class<?> _targetType
public InvalidFormatException(String msg, JsonLocation loc, Object value, Class<?> targetType)
public static InvalidFormatException from(JsonParser jp, String msg, Object value, Class<?> targetType)
public Object getValue()
getTargetType()
).
Note that value may not be available, depending on who throws the exception
and when.public Class<?> getTargetType()
getValue()
that failed
to deserialize.
Note that type may not be available, depending on who throws the exception
and when.Copyright © 2014 FasterXML. All Rights Reserved.