title: In Jersey, how do I make some methods use the POJO mapping feature and some not?
body: <p>I've got one resource (this is not a requirement) that has many different <code>@GET</code> methods in it.  I've configured my web.xml to have this in it:</p>
  
  <pre><code>    &lt;init-param&gt;
          &lt;param-name&gt;com.sun.jersey.api.json.POJOMappingFeature&lt;/param-name&gt;
          &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/init-param&gt;
  </code></pre>
  
  <p>This turns on the <a href="https://jersey.java.net/nonav/documentation/latest/json.html#json.pojo.approach.section" rel="nofollow">POJO mapping feature</a> which works great.  It allows me to return a pojo and it gets automatically converted to JSON.  </p>
  
  <p>Problem is I've got some code I want to reuse that returns JSON as a String.  I'm having trouble using these methods because Jersey does not interpret this as a JSON response, but as a String value to a JSON object.  So if, for example, the method that returns a String returns an empty list the client sees</p>
  
  <pre><code>"[]"
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>[]
  </code></pre>
  
  <p>The problem is the JSON is wrapped in a double quotes.  For these methods that return Strings, how can I tell Jersey to return the string as-is?</p>