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

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -