title: JSON Jersey JAXB
body: <p>I cant seem to post JSON to my webservice but XML works fine:</p>
  
  <pre><code>     @POST
   @Consumes({"application/xml","application/json"})
   public  void addOrder(JAXBElement&lt;OrderBean&gt;  order) {
       System.out.println("COOL");
   }
  
  
  
  curl -v -X POST --data-binary "&lt;orderBean&gt;&lt;customer&gt;test&lt;/customer&gt;&lt;/orderBean&gt;" -H"Content-Type: application/xml"  http://localhost:8080/webapp/rest/order
  
  
  curl -v -X POST --data-binary "{"orderBean":{"customer":"test"}}" -H"Content-Type: application/json" http://localhost:8080/webapp/rest/order
  </code></pre>
  
  <p>I get the following error with JSON:</p>
  
  <pre><code>java.lang.Error: Error: could not match input
      at com.sun.jersey.json.impl.reader.JsonLexer.zzScanError(JsonLexer.java:491)
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>