title: Method threw 'java.lang.StackOverflowError' exception. Cannot evaluate org.json.JSONObject.toString() - on calling json post method
body: <p>Code to call the api is as mentioned and the json response post method. error while calling json object at the line"JSONObject mJsonObj = new JSONObject(response);". Response available but error occurs as"Method threw 'java.lang.StackOverflowError' exception. Cannot evaluate org.json.JSONObject.toString()"</p>
  
  <pre><code>String PROJECT_URL = url+ r.getString(R.string.api_Get_two);
          mProgressBar.setVisibility(View.VISIBLE);
          StringRequest stringRequest = new StringRequest(Request.Method.POST, PROJECT_URL,
                  new Response.Listener&lt;String&gt;() {
                      @Override
                      public void onResponse(String response) {
                          pendingDataList.clear();
                          Log.d("JSON", response);
                          try {
                              JSONObject mJsonObj = new JSONObject(response);  (Error here)
                              JSONArray pendingChallans = (mJsonObj).getJSONArray("Day");
                              if(pendingChallans.length() &gt; 0) {
                                  for (int i = 0; i &lt;pendingChallans.length() ; i++) {
                                  PendingData pending = new PendingData();
                                   JSONObject obj = (JSONObject) pendingChallans.get(i);
                                    pending.setRowType(obj.getString("RowType"));
                                    pendingDataList.add(pending);
                                  }
                              }else {
                                  new Dialogs(mContext, "No Data Found .").createDialogWithMsg();
                              }
                          } catch (JSONException e) {
                              e.printStackTrace();
                          }finally {
                              mProgressBar.setVisibility(View.GONE);
                              pcdRecyclerview.setVisibility(View.VISIBLE);
                              myAdapter.notifyDataSetChanged();
                          }
                      }
  
  </code></pre>
  
  <pre><code>JSON:
  
  {
      "Day": [{
              "RowType": 1,
              "Sl": {
                  "Value": "",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Particulars": {
                  "Value": "PEN ",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value1": {
                  "Value": "",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value2": {
                  "Value": "",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value3": {
                  "Value": "",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "NextLevelZoomData": "",
              "NextLevelZoomType": 0
          },
          {
              "RowType": 2,
              "Sl": {
                  "Value": "SL.",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Particulars": {
                  "Value": "CUS",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value1": {
                  "Value": "BQty",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value2": {
                  "Value": "Amount",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value3": {
                  "Value": "Ood",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "NextLevelZoomData": "",
              "NextLevelZoomType": 0
          },
          {
              "RowType": 3,
              "Sl": {
                  "Value": "1. ",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Particulars": {
                  "Value": "ETH",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value1": {
                  "Value": "2",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value2": {
                  "Value": "7",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value3": {
                  "Value": "165 / 165",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "NextLevelZoomData": "[{\"UnitFields\":[{\"AllowSort\":1,\"Caption\":\"Challan No.\",\"DisplayOrder\":1,\"Value\":\"2 / 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"No. of Days\",\"DisplayOrder\":2,\"Value\":\"153\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Bal. Qty\",\"DisplayOrder\":3,\"Value\":\"1.00 PCS\",\"Highlight\":0,\"Visible\":0},{\"AllowSort\":1,\"Caption\":\"Item\",\"DisplayOrder\":4,\"Value\":\"WAVE\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Rate\",\"DisplayOrder\":5,\"Value\":\"398.00\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Sale\",\"DisplayOrder\":6,\"Value\":\"L A\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Location\",\"DisplayOrder\":7,\"Value\":\" FLOOR\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Comment\",\"DisplayOrder\":8,\"Value\":\"SELECTION~\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Supplier\",\"DisplayOrder\":9,\"Value\":\"gtt\",\"Highlight\":0,\"Visible\":1}],\"Unit\":\"09\"},{\"UnitcodeFields\":[{\"AllowSort\":1,\"Caption\":\"Challan No.\",\"DisplayOrder\":1,\"Value\":\"1/ 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"No. of Days\",\"DisplayOrder\":2,\"Value\":\"139\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Bal. Qty\",\"DisplayOrder\":3,\"Value\":\"1.00 PCS\",\"Highlight\":0,\"Visible\":0},{\"AllowSort\":1,\"Caption\":\"Item\",\"DisplayOrder\":4,\"Value\":\"EMjB\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Rate\",\"DisplayOrder\":5,\"Value\":\"37,590.00\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Sale\",\"DisplayOrder\":6,\"Value\":\"L A\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Location\",\"DisplayOrder\":7,\"Value\":\"MM 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Comment\",\"DisplayOrder\":8,\"Value\":\"PERSONAL\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Supplier\",\"DisplayOrder\":9,\"Value\":\"GOUR\",\"Highlight\":0,\"Visible\":1}],\"Unit\":\"08\"}]",
              "NextLevelZoomType": 2
          },
          {
              "RowType": 3,
              "Sl": {
                  "Value": "2. ",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Particulars": {
                  "Value": "SAE",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value1": {
                  "Value": "1",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value2": {
                  "Value": "30",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value3": {
                  "Value": "1",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "NextLevelZoomData": "[{\"UnitFields\":[{\"AllowSort\":1,\"Caption\":\"Challan No.\",\"DisplayOrder\":1,\"Value\":\"2 / 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"No. of Days\",\"DisplayOrder\":2,\"Value\":\"153\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Bal. Qty\",\"DisplayOrder\":3,\"Value\":\"1.00 PCS\",\"Highlight\":0,\"Visible\":0},{\"AllowSort\":1,\"Caption\":\"Item\",\"DisplayOrder\":4,\"Value\":\"WAVE\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Rate\",\"DisplayOrder\":5,\"Value\":\"398.00\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Sale\",\"DisplayOrder\":6,\"Value\":\"L A\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Location\",\"DisplayOrder\":7,\"Value\":\" FLOOR\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Comment\",\"DisplayOrder\":8,\"Value\":\"SELECTION~\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Supplier\",\"DisplayOrder\":9,\"Value\":\"gtt\",\"Highlight\":0,\"Visible\":1}],\"Unit\":\"09\"},{\"UnitcodeFields\":[{\"AllowSort\":1,\"Caption\":\"Challan No.\",\"DisplayOrder\":1,\"Value\":\"1/ 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"No. of Days\",\"DisplayOrder\":2,\"Value\":\"139\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Bal. Qty\",\"DisplayOrder\":3,\"Value\":\"1.00 PCS\",\"Highlight\":0,\"Visible\":0},{\"AllowSort\":1,\"Caption\":\"Item\",\"DisplayOrder\":4,\"Value\":\"EMjB\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Rate\",\"DisplayOrder\":5,\"Value\":\"37,590.00\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Sale\",\"DisplayOrder\":6,\"Value\":\"L A\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Location\",\"DisplayOrder\":7,\"Value\":\"MM 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Comment\",\"DisplayOrder\":8,\"Value\":\"PERSONAL\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Supplier\",\"DisplayOrder\":9,\"Value\":\"GOUR\",\"Highlight\":0,\"Visible\":1}],\"Unit\":\"08\"}]",
              "NextLevelZoomType": 2
          },
          {
              "RowType": 3,
              "Sl": {
                  "Value": "3. ",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Particulars": {
                  "Value": " M",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value1": {
                  "Value": "2",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value2": {
                  "Value": "4455",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value3": {
                  "Value": "15",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "NextLevelZoomData": "[{\"UnitFields\":[{\"AllowSort\":1,\"Caption\":\"Challan No.\",\"DisplayOrder\":1,\"Value\":\"2 / 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"No. of Days\",\"DisplayOrder\":2,\"Value\":\"153\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Bal. Qty\",\"DisplayOrder\":3,\"Value\":\"1.00 PCS\",\"Highlight\":0,\"Visible\":0},{\"AllowSort\":1,\"Caption\":\"Item\",\"DisplayOrder\":4,\"Value\":\"WAVE\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Rate\",\"DisplayOrder\":5,\"Value\":\"398.00\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Sale\",\"DisplayOrder\":6,\"Value\":\"L A\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Location\",\"DisplayOrder\":7,\"Value\":\" FLOOR\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Comment\",\"DisplayOrder\":8,\"Value\":\"SELECTION~\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Supplier\",\"DisplayOrder\":9,\"Value\":\"gtt\",\"Highlight\":0,\"Visible\":1}],\"Unit\":\"09\"},{\"UnitcodeFields\":[{\"AllowSort\":1,\"Caption\":\"Challan No.\",\"DisplayOrder\":1,\"Value\":\"1/ 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"No. of Days\",\"DisplayOrder\":2,\"Value\":\"139\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Bal. Qty\",\"DisplayOrder\":3,\"Value\":\"1.00 PCS\",\"Highlight\":0,\"Visible\":0},{\"AllowSort\":1,\"Caption\":\"Item\",\"DisplayOrder\":4,\"Value\":\"EMjB\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Rate\",\"DisplayOrder\":5,\"Value\":\"37,590.00\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Sale\",\"DisplayOrder\":6,\"Value\":\"L A\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Location\",\"DisplayOrder\":7,\"Value\":\"MM 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Comment\",\"DisplayOrder\":8,\"Value\":\"PERSONAL\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Supplier\",\"DisplayOrder\":9,\"Value\":\"GOUR\",\"Highlight\":0,\"Visible\":1}],\"Unit\":\"08\"}]",
              "NextLevelZoomType": 2
          },
          {
              "RowType": 3,
              "Sl": {
                  "Value": "4. ",
                  "isBold": 1,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Particulars": {
                  "Value": " DESIGNS",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value1": {
                  "Value": "1",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value2": {
                  "Value": "2000",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "Value3": {
                  "Value": "14",
                  "isBold": 0,
                  "isItalics": 0,
                  "Levels": 1,
                  "Align": 1
              },
              "NextLevelZoomData": "[{\"UnitFields\":[{\"AllowSort\":1,\"Caption\":\"Challan No.\",\"DisplayOrder\":1,\"Value\":\"00/ 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"No. of Days\",\"DisplayOrder\":2,\"Value\":\"146\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Bal. Qty\",\"DisplayOrder\":3,\"Value\":\"1.00 PCS\",\"Highlight\":0,\"Visible\":0},{\"AllowSort\":1,\"Caption\":\"Item\",\"DisplayOrder\":4,\"Value\":\"EMB\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Rate\",\"DisplayOrder\":5,\"Value\":\"2000\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Sale\",\"DisplayOrder\":6,\"Value\":\"L A\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Location\",\"DisplayOrder\":7,\"Value\":\"MM 1\",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Comment\",\"DisplayOrder\":8,\"Value\":\"ONE \",\"Highlight\":0,\"Visible\":1},{\"AllowSort\":1,\"Caption\":\"Supplier\",\"DisplayOrder\":9,\"Value\":\"FAIR \",\"Highlight\":0,\"Visible\":1}]}]",
              "NextLevelZoomType": 2
          }
  
  
      ],
      "Status": 1,
      "Msg": "Success"
  }
  
  
  ```[Screenshot attached on debugging ][1]
  
  
    [1]: https://i.stack.imgur.com/WrCOb.png
  </code></pre>