Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android studio json parser

/*
if respond is object
respond = { "a": "a", "b" : [1,2] }
*/
JSONObject jo = new JSONObject(respond); 

String a = jo.getString("a"); // a
JSONArray ja2 = jo.getJSONArray("b"); // [1,2]
int one = ja2.getInt(0) // 1
 
PREVIOUS NEXT
Tagged: #android #studio #json #parser
ADD COMMENT
Topic
Name
8+2 =