使用JSONObject
// Get some JSON from wherever String json = getJSonFromServer(); // Parse the JSON response into an object JSonObject object = new JSonObject(json); // Get the results array JSonArray users = object.getJSonArray("results"); for(int i = 0; i < users.length(); i++) { // Each element in the results array is a JSonObject with a single // property "user" which is a JSonObject that contains the user data JSonObject user = users.getJSonObject(i).getJSonObject("user"); // Do something with the user String firstName = user.getString("first_name"); }


