title: spring-mvc return raw json string
body: <p>I want the convenience of automatically serializing objects into JSON and ability to return raw JSON string. I am using Gson instead of Jackson, since Gson has been in my app for a while and I have existing tweaks, converters, and annotations peppered throughout my app.</p>
  
  <pre><code>&lt;mvc:annotation-driven &gt;
  &lt;mvc:message-converters register-defaults="true"&gt;
            &lt;bean class="com.test.GSONHttpMessageConverter" /&gt;   
      &lt;/mvc:message-converters&gt;
  &lt;/mvc:annotation-driven&gt;
  </code></pre>
  
  <p>I can automatically serialize pojo's:</p>
  
  <pre><code>@RequestMapping(value="foo/{name}", method = RequestMethod.GET)
  public @ResponseBody Shop getShopInJSON(@PathVariable String name) {
      return new Shop();
  }
  </code></pre>
  
  <p>I want this to work also:</p>
  
  <pre><code>@RequestMapping(value="rawJsonTest/{name}", method = RequestMethod.GET, produces=MediaType.APPLICATION_JSON_VALUE)
  public @ResponseBody String rawJsonTest(@PathVariable String name) {
      return "{\"test\":5}";
  
  }
  </code></pre>
  
  <p>Result right now is an escaped value:</p>
  
  <pre><code>"{\"test\":5}"
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>{"test":5}
  </code></pre>