Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.exc

public Class InvalidFormatException

extends MismatchedInputException
Class Inheritance
Imports
com.fasterxml.jackson.core.JsonLocation, .JsonParser

Specialized sub-class of MismatchedInputException that is used when the underlying problem appears to be that of bad formatting of a value to deserialize.
Since
2.1

Field Summary

Modifier and TypeField and Description
protected final Object
_value

Underlying value that could not be deserialized into target type, if available.

private static final long
Inherited from com.fasterxml.jackson.databind.exc.MismatchedInputException:
_targetType

Constructor Summary

AccessConstructor and Description
public
InvalidFormatException(String msg, Object value, Class<?> targetType)
Deprecated Since 2.7 Use variant that takes JsonParser

public
InvalidFormatException(String msg, JsonLocation loc, Object value, Class<?> targetType)
Deprecated Since 2.7 Use variant that takes JsonParser

public
InvalidFormatException(JsonParser p, String msg, Object value, Class<?> targetType)

Method Summary

Modifier and TypeMethod and Description
public static InvalidFormatException
from(JsonParser p, String msg, Object value, Class<?> targetType)

public Object
getValue()

Accessor for checking source value (String, Number usually) that could not be deserialized into target type (getTargetType).

Inherited from com.fasterxml.jackson.databind.exc.MismatchedInputException:
fromfromfromgetTargetTypesetTargetType

Field Detail

_valueback to summary
protected final Object _value

Underlying value that could not be deserialized into target type, if available.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.JsonMappingException.serialVersionUID.

Constructor Detail

InvalidFormatExceptionback to summary
public InvalidFormatException(String msg, Object value, Class<?> targetType)

Deprecated

Since 2.7 Use variant that takes JsonParser

Annotations
@Deprecated
InvalidFormatExceptionback to summary
public InvalidFormatException(String msg, JsonLocation loc, Object value, Class<?> targetType)

Deprecated

Since 2.7 Use variant that takes JsonParser

Annotations
@Deprecated
InvalidFormatExceptionback to summary
public InvalidFormatException(JsonParser p, String msg, Object value, Class<?> targetType)
Since
2.7

Method Detail

fromback to summary
public static InvalidFormatException from(JsonParser p, String msg, Object value, Class<?> targetType)
getValueback to summary
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.