2016-12-29 70 views

回答

0
try { 
JSONObject jsonObj = new JSONObject(response); 

// Getting JSON Array node 
JSONArray data = jsonObj.getJSONArray("results"); 

// looping through All Data 
    for (int i = 0; i <data.length(); i++) { 
    JSONObject c = data.getJSONObject(i); 

    String id = c.getString("id"); 
    String name = c.getString("name"); 
    String email = c.getString("ordering"); 
    String address = c.getString("images"); 

} 

catch(Exception e) 
{ 
    //Json exception here 
}