DatabindExceptions
that are due to input not mapping to target definition; these are typically
considered "client errors" since target type definition itself is not the root cause
but mismatching input. This is in contrast to InvalidDefinitionException which
signals a problem with target type definition and not input.
This type is used as-is for some input problems, but in most cases there should be more explicit subtypes to use.
Note
name chosen to differ from `java.util.InputMismatchException` since while that would have been better name, use of same overlapping name causes nasty issues with IDE auto-completion, so slightly less optimal chosen.
| Modifier and Type | Field and Description |
|---|---|
| protected JsonToken | _currentToken
Current token at the point when exception was thrown (if available). |
| protected Class | _targetType
Type of value that was to be deserialized |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected static JsonToken | |
| public static MismatchedInputException | |
| public static MismatchedInputException | |
| public JsonToken | Returns: Current token at the point when exception was thrown, if available (null if not)
|
| public Class | getTargetType()
Accessor for getting intended target type, with which input did not match, if known; `null` if not known for some reason. |
| public MismatchedInputException | |
| public MismatchedInputException |
| _currentToken | back to summary |
|---|---|
| protected JsonToken _currentToken Current token at the point when exception was thrown (if available). | |
| _targetType | back to summary |
|---|---|
| protected Class<?> _targetType Type of value that was to be deserialized | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| MismatchedInputException | back to summary |
|---|---|
| protected MismatchedInputException(JsonParser p, String msg) | |
| MismatchedInputException | back to summary |
|---|---|
| protected MismatchedInputException(JsonParser p, String msg, TokenStreamLocation loc) | |
| MismatchedInputException | back to summary |
|---|---|
| protected MismatchedInputException(JsonParser p, String msg, Class<?> targetType) | |
| MismatchedInputException | back to summary |
|---|---|
| protected MismatchedInputException(JsonParser p, String msg, JavaType targetType) | |
| _currentToken | back to summary |
|---|---|
| protected static JsonToken _currentToken(JsonParser p) | |
| from | back to summary |
|---|---|
| public static MismatchedInputException from(JsonParser p, JavaType targetType, String msg) | |
| from | back to summary |
|---|---|
| public static MismatchedInputException from(JsonParser p, Class<?> targetType, String msg) | |
| getCurrentToken | back to summary |
|---|---|
public JsonToken getCurrentToken()
| |
| getTargetType | back to summary |
|---|---|
| public Class Accessor for getting intended target type, with which input did not match, if known; `null` if not known for some reason. | |
| setCurrentToken | back to summary |
|---|---|
| public MismatchedInputException setCurrentToken(JsonToken t) | |
| setTargetType | back to summary |
|---|---|
| public MismatchedInputException setTargetType(JavaType t) | |