public class MismatchedInputException extends JsonMappingException
JsonMappingExceptions
 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 | Field and Description | 
|---|---|
protected Class<?> | 
_targetType
Type of value that was to be deserialized 
 | 
_path, _processor| Modifier | Constructor and Description | 
|---|---|
protected  | 
MismatchedInputException(com.fasterxml.jackson.core.JsonParser p,
                        String msg)  | 
protected  | 
MismatchedInputException(com.fasterxml.jackson.core.JsonParser p,
                        String msg,
                        Class<?> targetType)  | 
protected  | 
MismatchedInputException(com.fasterxml.jackson.core.JsonParser p,
                        String msg,
                        JavaType targetType)  | 
protected  | 
MismatchedInputException(com.fasterxml.jackson.core.JsonParser p,
                        String msg,
                        com.fasterxml.jackson.core.JsonLocation loc)  | 
| Modifier and Type | Method and Description | 
|---|---|
static MismatchedInputException | 
from(com.fasterxml.jackson.core.JsonParser p,
    Class<?> targetType,
    String msg)  | 
static MismatchedInputException | 
from(com.fasterxml.jackson.core.JsonParser p,
    JavaType targetType,
    String msg)  | 
static MismatchedInputException | 
from(com.fasterxml.jackson.core.JsonParser p,
    String msg)
Deprecated.  
 | 
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)  | 
_appendPathDesc, _buildMessage, from, from, from, from, from, from, from, fromUnexpectedIOE, getLocalizedMessage, getMessage, getPath, getPathReference, getPathReference, getProcessor, prependPath, prependPath, prependPath, toString, withCause, wrapWithPath, wrapWithPath, wrapWithPathclearLocation, getLocation, getMessageSuffix, getOriginalMessageaddSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTraceprotected Class<?> _targetType
protected MismatchedInputException(com.fasterxml.jackson.core.JsonParser p,
                                   String msg)
protected MismatchedInputException(com.fasterxml.jackson.core.JsonParser p,
                                   String msg,
                                   com.fasterxml.jackson.core.JsonLocation loc)
protected MismatchedInputException(com.fasterxml.jackson.core.JsonParser p,
                                   String msg,
                                   Class<?> targetType)
@Deprecated public static MismatchedInputException from(com.fasterxml.jackson.core.JsonParser p, String msg)
public static MismatchedInputException from(com.fasterxml.jackson.core.JsonParser p, JavaType targetType, String msg)
public static MismatchedInputException from(com.fasterxml.jackson.core.JsonParser p, Class<?> targetType, String msg)
public MismatchedInputException setTargetType(JavaType t)
public Class<?> getTargetType()
Copyright © 2008–2022 FasterXML. All rights reserved.