title: Getting Unterminated object exception for JSON array
body: <p>I am getting an array of JSON from server. But I am trying to access it I am getting the Unterminated object exception.</p>
  
  <p>I checked the output for any comma missed or wrong syntax but still not working.</p>
  
  <p>JSON array</p>
  
  <pre><code>    [
    {
      "cust_id": "8",
      "mer_id": "3",
      "fav": "1",
      "cont_name": "sandeep",
      "kirana_name": "kasar",
      "phone_no": "9422879610",
      "email_id": "kasar1@gmail.com",
      "address": "nashik"
    },
    {
      "cust_id": "8",
      "mer_id": "1",
      "fav": "1",
      "cont_name": "sandeep",
      "kirana_name": "general store",
      "phone_no": "1212345623",
      "email_id": "kasar@gmail.com",
      "address": "nashik road nashik"
    },
    {
      "cust_id": "8",
      "mer_id": "5",
      "fav": "0",
      "cont_name": "a",
      "kirana_name": "s",
      "phone_no": "9422879610",
      "email_id": "sam@gmail.com",
      "address": "aa"
    },
    {
      "cust_id": "8",
      "mer_id": "6",
      "fav": "0",
      "cont_name": "see ya",
      "kirana_name": "see ya kirana",
      "phone_no": "8698766460",
      "email_id": "deepmalasingh55@gmail.com",
      "address": "dee"
    },
    {
      "cust_id": "8",
      "mer_id": "5",
      "fav": "0",
      "cont_name": "a",
      "kirana_name": "s",
      "phone_no": "9422879610",
      "email_id": "sam@gmail.com",
      "address": "aa"
    },
    {
      "cust_id": "8",
      "mer_id": "9",
      "fav": "0",
      "cont_name": "fre",
      "kirana_name": "fee kirana",
      "phone_no": "8698766460",
      "email_id": "deepmalasinghop@gmail.com",
      "address": "plotno:12,sahaydri nagar"
    }
  ]
  </code></pre>
  
  <p>Retrieving data from array :</p>
  
  <pre><code> @Override
      protected void onPostExecute(JSONObject response) {
          super.onPostExecute(response);
          progressDialog.dismiss();
          try {
              merchantsList.clear();
              JSONArray jsonArray = response.getJSONArray("array");
              if(jsonArray.length() &gt; 0) {
                  for (int i = 0; i &lt; jsonArray.length(); i++) {
                      JSONObject jsonObject = jsonArray.getJSONObject(i);
                      if (jsonObject.has("message")) {
                          String message = jsonObject.getString("message");
                          Snackbar snackbar = Snackbar.make(coordinatorLayout, message, Snackbar.LENGTH_LONG);
                          snackbar.show();
                      } else {
                          long id,merchant_id,item_quantity;
                          String kirana_name,created_at,address;
                          int fav;
  
                           merchant_id=jsonObject.getLong("mer_id");
                          kirana_name=jsonObject.getString("kirana_name");
  
                          fav=jsonObject.getInt("fav");
                          address=jsonObject.getString("address");
  
  
                          Merchants merchants = new Merchants(merchant_id,kirana_name,address,fav);
                          merchantsList.add(merchants);
                          merchantsAdapter.notifyDataSetChanged();
  
                      }
                  }
  
              }
  </code></pre>
  
  <p>exception :</p>
  
  <pre><code>    org.json.JSONException: Unterminated object at character 973 of {"array":[{"cust_id":"8","mer_id":"3","fav":"1","cont_name":"sandeep","kirana_name":"kasar","phone_no":"9422879610","email_id":"kasar1@gmail.com","address":"nashik"},{"cust_id":"8","mer_id":"1","fav":"1","cont_name":"sandeep","kirana_name":"general store","phone_no":"1212345623","email_id":"kasar@gmail.com","address":"nashik road nashik"},{"cust_id":"8","mer_id":"5","fav":"0","cont_name":"a","kirana_name":"s","phone_no":"9422879610","email_id":"sam@gmail.com","address":"aa"},{"cust_id":"8","mer_id":"6","fav":"0","cont_name":"see ya","kirana_name":"see ya kirana","phone_no":"8698766460","email_id":"deepmalasingh55@gmail.com","address":"dee"},{"cust_id":"8","mer_id":"5","fav":"0","cont_name":"a","kirana_name":"s","phone_no":"9422879610","email_id":"sam@gmail.com","address":"aa"},{"cust_id":"8","mer_id":"9","fav":"0","cont_name":"fre","kirana_name":"fee kirana","phone_no":"8698766460","email_id":"deepmalasinghop@gmail.com","address":"plotno:12,sahaydri nagar"}]895da9a9a4cdd0825848479ee7e6c7ed2}
  11-28 10:23:52.302 27004-27069/com.kiranaapp W/System.err:     at org.json.JSONTokener.syntaxError(JSONTokener.java:450)
  </code></pre>
  
  <p>What's going wrong?? Any help will be great..Than you..</p>