0

String not taking all 13 arrays, only 10 are converting to string.

  JSONArray jsonOA = new JSONArray(); // making jsonarrays
                    jsonOA.put(objOA);
                    JSONArray jsonOB = new JSONArray();
                    jsonOB.put(objOB);
                    JSONArray jsonOC = new JSONArray();
                    jsonOC.put(objOC);
                    JSONArray jsonOD = new JSONArray();
                    jsonOD.put(objOD);
                    JSONArray jsonOE = new JSONArray();
                    jsonOE.put(objOE);
                    JSONArray jsonOF = new JSONArray();
                    jsonOF.put(objOF);
                    JSONArray jsonOG = new JSONArray();
                    jsonOG.put(objOG);
                    JSONArray jsonOH = new JSONArray();
                    jsonOH.put(objOH);
                    JSONArray jsonOI = new JSONArray();
                    jsonOI.put(objOI);
                    JSONArray jsonOJ = new JSONArray();
                    jsonOJ.put(objOJ);
                    JSONArray jsonOK = new JSONArray();
                    jsonOK.put(objOK);
                    JSONArray jsonOL = new JSONArray();
                    jsonOL.put(objOL);


                    JSONObject obj = new JSONObject(); // json obj
                     try {
                         obj.put(KEY_OA, jsonOA); 
                         obj.put(KEY_OB, jsonOB);
                         obj.put(KEY_OC, jsonOC);
                         obj.put(KEY_OD, jsonOD);
                         obj.put(KEY_OE, jsonOE);
                         obj.put(KEY_OF, jsonOF);
                         obj.put(KEY_OG, jsonOG);
                         obj.put(KEY_OH, jsonOH);
                         obj.put(KEY_OI, jsonOI);
                         obj.put(KEY_OJ, objOJ);
                         obj.put(KEY_OK, objOK);
                         obj.put(KEY_OL, objOL);
                     }catch (JSONException e) {
                         e.printStackTrace();
                     }
        String jsonStr = obj.toString(); // converting jsonobj to string
        Log.d("Json:", jsonStr);
        map.put(KEY_DATA, jsonStr);
        return map;**
petey
  • 16,914
  • 6
  • 65
  • 97

0 Answers0