Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.jaxrs.json;
 
 
Implementation of javax.ws.rs.ext.ExceptionMapper to send down a "400 Bad Request" in the event unparsable JSON is received.
    public Response toResponse(JsonParseException exception) {
        return Response.status(..).entity(exception.getMessage()).type("text/plain").build();
    }
New to GrepCode? Check out our FAQ X