title: How to format a json string?
body: <p>I want to convert </p>
  
  <pre><code>{"name":"john","age":22,"class":"mca"}
  </code></pre>
  
  <p>to</p>
  
  <pre><code>"{\"name\":\"john\",\"age\":22,\"class\":\"mca\"}"
  </code></pre>
  
  <p>How can I do this using Gson library? Or is there another way to do this?</p>