public class UnrecognizedPropertyException extends JsonMappingException
JsonMappingException
sub-class specifically used
to indicate problems due to encountering a JSON property that could
not be mapped to an Object property (via getter, constructor argument
or field).JsonMappingException.Reference
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_propertiesAsString
Lazily constructed description of known properties, used for
constructing actual message if and as needed.
|
protected java.util.Collection<java.lang.Object> |
_propertyIds
Set of ids of properties that are known for the type, if this
can be statically determined.
|
protected java.lang.Class<?> |
_referringClass
Class that does not contain mapping for the unrecognized property.
|
protected java.lang.String |
_unrecognizedPropertyName
Note: redundant information since it is also included in the
reference path.
|
_path
Constructor and Description |
---|
UnrecognizedPropertyException(java.lang.String msg,
com.fasterxml.jackson.core.JsonLocation loc,
java.lang.Class<?> referringClass,
java.lang.String propName,
java.util.Collection<java.lang.Object> propertyIds) |
Modifier and Type | Method and Description |
---|---|
static UnrecognizedPropertyException |
from(com.fasterxml.jackson.core.JsonParser jp,
java.lang.Object fromObjectOrClass,
java.lang.String propertyName,
java.util.Collection<java.lang.Object> propertyIds)
Factory method used for constructing instances of this exception type.
|
java.util.Collection<java.lang.Object> |
getKnownPropertyIds() |
java.lang.String |
getMessageSuffix() |
java.lang.Class<?> |
getReferringClass()
Method for accessing type (class) that is missing definition to allow
binding of the unrecognized property.
|
java.lang.String |
getUnrecognizedPropertyName()
Convenience method for accessing logical property name that could
not be mapped.
|
_appendPathDesc, _buildMessage, from, from, fromUnexpectedIOE, getLocalizedMessage, getMessage, getPath, getPathReference, getPathReference, prependPath, prependPath, prependPath, toString, wrapWithPath, wrapWithPath, wrapWithPath
getLocation, getOriginalMessage
protected final java.lang.Class<?> _referringClass
protected final java.lang.String _unrecognizedPropertyName
Note: redundant information since it is also included in the reference path.
protected final java.util.Collection<java.lang.Object> _propertyIds
protected transient java.lang.String _propertiesAsString
public UnrecognizedPropertyException(java.lang.String msg, com.fasterxml.jackson.core.JsonLocation loc, java.lang.Class<?> referringClass, java.lang.String propName, java.util.Collection<java.lang.Object> propertyIds)
public static UnrecognizedPropertyException from(com.fasterxml.jackson.core.JsonParser jp, java.lang.Object fromObjectOrClass, java.lang.String propertyName, java.util.Collection<java.lang.Object> propertyIds)
jp
- Underlying parser used for reading input being used for data-bindingfromObjectOrClass
- Reference to either instance of problematic type (
if available), or if not, type itselfpropertyName
- Name of unrecognized propertypropertyIds
- (optional, null if not available) Set of properties that
type would recognize, if completely known: null if set can not be determined.public java.lang.String getMessageSuffix()
getMessageSuffix
in class com.fasterxml.jackson.core.JsonProcessingException
public java.lang.Class<?> getReferringClass()
public java.lang.String getUnrecognizedPropertyName()
public java.util.Collection<java.lang.Object> getKnownPropertyIds()
Copyright © 2013. All Rights Reserved.