Jackson not consuming the JSON root element
问题 I'm using JAX-RS + Jersey to consume the web-service request and Jackson to translate JSON data: @Path("/") public class JAXRSRestController { @Path("/jsonRequest") @POST @Consumes(MediaType.APPLICATION_JSON) public Response submitJsonRequest(SampleObject sampleObject, @Context HttpHeaders headers) { Ack ack = new Ack(); ack.setUniqueId(sampleObject.getId()); ack.setType(sampleObject.getName()); return Response.ok().entity(ack).build(); } } Here if the request is in the below format, it would