public class MismatchedInputException extends JsonMappingException
JsonMappingException
s
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.
JsonMappingException.Reference
Modifier and Type | Method and Description |
---|---|
static MismatchedInputException |
from(JsonParser p,
java.lang.Class<?> targetType,
java.lang.String msg) |
static MismatchedInputException |
from(JsonParser p,
JavaType targetType,
java.lang.String msg) |
static MismatchedInputException |
from(JsonParser p,
java.lang.String msg)
Deprecated.
|
java.lang.Class<?> |
getTargetType()
Accessor for getting intended target type, with which input did not match,
if known; `null` if not known for some reason.
|
MismatchedInputException |
setTargetType(JavaType t) |
from, from, from, from, from, from, from, fromUnexpectedIOE, getLocalizedMessage, getMessage, getPath, getPathReference, getPathReference, getProcessor, prependPath, prependPath, prependPath, toString, wrapWithPath, wrapWithPath, wrapWithPath
clearLocation, getLocation, getOriginalMessage
@Deprecated public static MismatchedInputException from(JsonParser p, java.lang.String msg)
public static MismatchedInputException from(JsonParser p, JavaType targetType, java.lang.String msg)
public static MismatchedInputException from(JsonParser p, java.lang.Class<?> targetType, java.lang.String msg)
public MismatchedInputException setTargetType(JavaType t)
public java.lang.Class<?> getTargetType()
Copyright © 2010 - 2020 Adobe. All Rights Reserved