title: Java escapes quotes in JSON strings
body: <p>I've got a JSON string persisted in a DB (in a column of type <em>Text</em>), which I would like for clients of the server to be able to retrieve through a REST API.</p>
  
  <p>Problem is that once the JSON string is retrieved by the backend and stored in a <em>String</em> object, ready to be returned to the client as part of the response body, Java automatically escapes the quotes.</p>
  
  <p>So a JSON string persisted as:</p>
  
  <p><code>{"key1": "value1", "key2": "value2"}</code></p>
  
  <p>Would be retrieved and stored in a string object as:</p>
  
  <p><code>{\"key1\": \"value1\", \"key2\": \"value2\"}</code></p>
  
  <p>Then this escaped string would be returned to the client. My worry is that in the format that it is it won't be usable by the client.</p>
  
  <p>I've seen some people using regex to remove the backslash, but I'm not sure how feasible that would be as a solution.</p>
  
  <p>Any suggestions?</p>