title: Posting JSON via Jersey
body: <p>I have this code</p>
  
  <pre><code>    ClientConfig config = new DefaultClientConfig();
      Client client = Client.create(config);
      client.addFilter(new HTTPBasicAuthFilter(adminUser, adminPass));
      client.addFilter(new LoggingFilter(System.out));
  
      WebResource service = client.resource(baseURL);
      ClientResponse clientResponse = service.path("api")
              .path("v1")
              .path("shoppers")
              .path(orderId)
              .path("status.json").accept(MediaType.APPLICATION_JSON).post(ClientResponse.class, request);
  </code></pre>
  
  <p>Whenever i try to post a JSON requestl ike that, I am getting <code>HTTP 415</code> error response. A little digging into this issue revealed that JERSEY isn't marshalling my object properly. By adding the <code>LoggingFilter</code>, I can see that in request body, the <code>JAXBObject</code> was marshed to <code>XML</code> and not <code>JSON</code>. </p>
  
  <p>Is it a known behaviour of JERSEY? What should i do here ?</p>