com.fasterxml.jackson.databind.exc

## Class UnrecognizedPropertyException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.io.IOException
      - - com.fasterxml.jackson.core.JsonProcessingException
        - - com.fasterxml.jackson.databind.JsonMappingException
          - - com.fasterxml.jackson.databind.exc.PropertyBindingException
            - - com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException

- All Implemented Interfaces:
    Serializable

      public class UnrecognizedPropertyException
      extends PropertyBindingException

  Specialized `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).
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonMappingException

      `JsonMappingException.Reference`

  - ### Field Summary

    - ### Fields inherited from class com.fasterxml.jackson.databind.exc.PropertyBindingException

      `_propertiesAsString, _propertyIds, _propertyName, _referringClass`

    - ### Fields inherited from class com.fasterxml.jackson.databind.JsonMappingException

      `_path`

    - ### Fields inherited from class com.fasterxml.jackson.core.JsonProcessingException

      `_location`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnrecognizedPropertyException(String msg, JsonLocation loc, Class<?> referringClass, String propName, Collection<Object> propertyIds)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static UnrecognizedPropertyException` | `from(JsonParser jp, Object fromObjectOrClass, String propertyName, Collection<Object> propertyIds)` Factory method used for constructing instances of this exception type.
    `String` | `getUnrecognizedPropertyName()` Deprecated. Since 2.3, use `PropertyBindingException.getPropertyName()` instead.

    - ### Methods inherited from class com.fasterxml.jackson.databind.exc.PropertyBindingException

      `getKnownPropertyIds, getMessageSuffix, getPropertyName, getReferringClass`

    - ### Methods inherited from class com.fasterxml.jackson.databind.JsonMappingException

      `_appendPathDesc, _buildMessage, from, from, fromUnexpectedIOE, getLocalizedMessage, getMessage, getPath, getPathReference, getPathReference, prependPath, prependPath, prependPath, toString, wrapWithPath, wrapWithPath, wrapWithPath`

    - ### Methods inherited from class com.fasterxml.jackson.core.JsonProcessingException

      `getLocation, getOriginalMessage`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### UnrecognizedPropertyException

          public UnrecognizedPropertyException(String msg,
                                       JsonLocation loc,
                                       Class<?> referringClass,
                                       String propName,
                                       Collection<Object> propertyIds)

  - ### Method Detail

    - #### from

          public static UnrecognizedPropertyException from(JsonParser jp,
                                           Object fromObjectOrClass,
                                           String propertyName,
                                           Collection<Object> propertyIds)

      Factory method used for constructing instances of this exception type.
      Parameters:
        `jp` - Underlying parser used for reading input being used for data-binding
        `fromObjectOrClass` - Reference to either instance of problematic type ( if available), or if not, type itself
        `propertyName` - Name of unrecognized property
        `propertyIds` - (optional, null if not available) Set of properties that type would recognize, if completely known: null if set can not be determined.

    - #### getUnrecognizedPropertyName

          @Deprecated
          public String getUnrecognizedPropertyName()

      Deprecated. Since 2.3, use `PropertyBindingException.getPropertyName()` instead.

Copyright © 2012-2013 FasterXML. All Rights Reserved.