Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. [
  2. {
  3. "a": "u",
  4. "b": "v"
  5. },
  6. {
  7. "a": "x",
  8. "b": "y"
  9. }
  10. ]
  11.  
  12. JSONArray jsonArray = new JSONArray(result);
  13.  
  14. for(int i=0; i<jsonArray.length(); i++) {
  15.  
  16. JSONObject jsonObject = jsonArray.getJSONObject(i);
  17. //further processing here
  18.  
  19. }
  20.  
  21. JSONArray[0] is not a JSONObject.
  22.  
  23. ["{"a":"u","b":"v"},{"a":"x","b":"y"}]"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement