After putting together a project including this code, I found that it only loads one object into the
Using java Syntax Highlighting
JSONObject jsonObjRecv = new JSONObject(resultString);
Parsed in 0.035 seconds, using
GeSHi 1.0.8.4
JSONObject. It leaves out all the other data that is important to retrieve. I notice that in the
Using java Syntax Highlighting
String resultString= convertStreamToString(instream);
Parsed in 0.035 seconds, using
GeSHi 1.0.8.4
String, all of the data is available. Why is all of the data left out after the first sequence of { } in my json file?
Edit: i just fixed this problem, stupid mistake.
Resolution: instead of returning a JSONObject, i return a JSONArray.
Using java Syntax Highlighting
String resultString = convertStreamToString(inputStream);
inputStream.close();
JSONArray jsonArrayReceived = new JSONArray(resultString);
return jsonArrayReceived;
Parsed in 0.037 seconds, using
GeSHi 1.0.8.4