title: How to convert ArrayList<object> to String and vice versa
body: <p>I want to convert my <code>ArrayList&lt;object&gt;</code> to a <strong>JSON</strong> <code>String</code> and back to <code>ArrayList&lt;object&gt;</code></p>
  
  <p>But I really don't know how to do that :</p>
  
  <p>Something like :</p>
  
  <pre><code>Convert
  ArrayList&lt;data&gt; arrayData = new ArrayList&lt;data&gt;();
   JSONObject retObject = new JSONObject();
      retObject.put("data", new JSONArray(arrayData ));
  
      Return convert
  
  idk...
  </code></pre>