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 - Performance of System() -

python - how we can use ajax() in views.py in django? -

python - Sequence Pattern recognition with Pybrain -