title: How to convert gson jsonarray to JSONArray
body: <p>I am getting huge json response from server, I am taking json array part from that json response and I am converting into json array using gson json array after that I need to put into json object, there I am getting out of memory exception.</p>
  
  <p>log:</p>
  
  <pre><code> Gson gson = new GsonBuilder().create();
   JsonArray customArray = gson.toJsonTree(list.getAsJsonArray();
   JSONArray jsonArray = new JSONArray(customArray.toString());  // here  i am getting out of memory
   schoolListObject.put("list", jsonArray);
  </code></pre>