Parsing multiple rows of json in Android -
I want to get a json file from my server and want to display it in my Android app.
Now, it's just showing in the log console
I'm able to get the full Jason file, like something:
[ However, if the word "name": "jan", "surname": "connor"}, {"name": "border", "surname": "connor"}] I try to use a string like this, so it fails because []
If I try:
JSONObject json = new JSONObject (results); // log the previous string in the result. I ("test", json.toString ()) is; I have to delete [and] to proceed and log in to NN, I have my Jason's first entry.
If I leave [and] more, then do not just do anything, stop before the first line.
The full example code is
change it
< Code> JSONObject json = new JSONObject (results); // log the previous string in the result. I ("test", json.toString ()) is; with
JSONArray json = new JSONArray (results); // log the previous string in the result. I ("test", json.toString ()) is;
Comments
Post a Comment