com.fasterxml.jackson.core.JsonParseException s),
but rather result from failed attempts to convert specific Java value out of valid
but incompatible input value. One example is numeric coercions where target number type's
range does not allow mapping of too large/too small input value.
| Modifier and Type | Field and Description |
|---|---|
| protected final JsonToken | _inputType
Input token that represents input value that failed to coerce. |
| protected final Class | _targetType
Target type that input value failed to coerce to. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | InputCoercionException(JsonParser
Parser in use at the point where failure occurred p, String Exception mesage to use msg, JsonToken Shape of input that failed to coerce inputType, Class<?> Target type of failed coercion targetType)Constructor that uses current parsing location as location, and
sets processor (accessible via |
| Modifier and Type | Method and Description |
|---|---|
| public JsonToken | Returns: "Shape" of input for which coercion failed, asJsonTokenAccessor for getting information about input type (in form of token, giving "shape" of input) for which coercion failed. |
| public Class | Returns: Target type of failed conversionAccessor for getting information about target type (in form of Java |
| public InputCoercionException | withParser(JsonParser
Parser instance to assign to this exception p)Implements abstract com. Fluent method that may be used to assign originating |
| public InputCoercionException | withRequestPayload(RequestPayload
Payload to assign to this exception p)Implements abstract com. Fluent method that may be used to assign payload to this exception, to let recipient access it for diagnostics purposes. |
| _inputType | back to summary |
|---|---|
| protected final JsonToken _inputType Input token that represents input value that failed to coerce. | |
| _targetType | back to summary |
|---|---|
| protected final Class<?> _targetType Target type that input value failed to coerce to. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| InputCoercionException | back to summary |
|---|---|
| public InputCoercionException(JsonParser p, String msg, JsonToken inputType, Class<?> targetType) Constructor that uses current parsing location as location, and
sets processor (accessible via
| |
| getInputType | back to summary |
|---|---|
| public JsonToken getInputType() Accessor for getting information about input type (in form of token, giving "shape" of input) for which coercion failed. | |
| getTargetType | back to summary |
|---|---|
| public Class Accessor for getting information about target type (in form of Java
| |
| withParser | back to summary |
|---|---|
| public InputCoercionException withParser(JsonParser p) Implements abstract com. Fluent method that may be used to assign originating Note `this` instance is modified and no new instance is constructed.
| |
| withRequestPayload | back to summary |
|---|---|
| public InputCoercionException withRequestPayload(RequestPayload p) Implements abstract com. Doc from com. Fluent method that may be used to assign payload to this exception, to let recipient access it for diagnostics purposes. Note `this` instance is modified and no new instance is constructed.
| |