JsonParseExceptionMapper (Jackson: JAX-RS (parent) 2.14.0 API)

com.fasterxml.jackson.jaxrs.base

## Class JsonParseExceptionMapper

- java.lang.Object
- - com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper

- All Implemented Interfaces:
    javax.ws.rs.ext.ExceptionMapper<com.fasterxml.jackson.core.JsonParseException>

      public class JsonParseExceptionMapper
      extends Object
      implements javax.ws.rs.ext.ExceptionMapper<com.fasterxml.jackson.core.JsonParseException>

  Implementation of `ExceptionMapper` to send down a "400 Bad Request" in the event unparsable JSON is received.

  Note that `Provider` annotation was include up to Jackson 2.7, but removed from 2.8 (as per [jaxrs-providers#22]

  Since:
    2.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsonParseExceptionMapper()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `toResponse(com.fasterxml.jackson.core.JsonParseException exception)`

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

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

- - ### Constructor Detail

    - #### JsonParseExceptionMapper

          public JsonParseExceptionMapper()

  - ### Method Detail

    - #### toResponse

          public javax.ws.rs.core.Response toResponse(com.fasterxml.jackson.core.JsonParseException exception)

      Specified by:
        `toResponse` in interface `javax.ws.rs.ext.ExceptionMapper<com.fasterxml.jackson.core.JsonParseException>`

Copyright © 2022 FasterXML. All rights reserved.