title: How to have each record of JSON on a separate line?
body: <p>When I use JSONArray and JSONObject to generate a JSON, whole JSON will be generated in one line. How can I have each record on a separate line?</p>
  
  <p>It generates like this:</p>
  
  <pre><code> [{"key1":"value1","key2":"value2"}]
  </code></pre>
  
  <p>I need it to be like following:</p>
  
  <pre><code> [{
      "key1":"value1",
      "key2":"value2"
      }]
  </code></pre>