Sunday, 15 April 2012

Parsing Multiple (Thousands) of JSON objects from a url in Java -


I have to deal with thousands of JSN objects which I am getting in Java from url. I always have the usual JSON code Tried to use but I got the thread "main" org.json.JSONException in error: a JSONObject text2 {character 3 line1]

Because there is no curl braces in JSON data, only the square bits around each JSON object Racquets.

I appreciate any help I can get with it.

> The BTW code I was trying to use was the code posted in the highest answer:

thanks

I have detected the correct method to handle it.

Once I treat the data as Jason Ellie, then it works fine. I then specify the field that I want with the name instead of the number reference. For example: System.out.println (json.toString ()); Println (json.get (2));

The header will print the line and print the second area of ​​the header row.

To process the next object, I think line number on each iteration will work fine.


No comments:

Post a Comment