MIME types and unmarshalling
44.1.3. MIME types and unmarshalling. The Accept header sent by any client JavaScript function is controlled by the $accepts parameter, which overrides the @Produces annotation on the JAX-RS endpoint. The returned value however is controlled by the Content-Type header sent in the response as follows: Table 44.2. Return values by MIME type MIME Description text/xml,application/xml,application/*+xml The response entity is parsed as XML before being returned. The return value is thus a DOM Document. application/json The response entity is parsed as JSON before being returned. The return value is thus a JavaScript Object. Anything else The response entity is returned raw.