JSONArray list = json.getJSONArray("data");
final int size = list.length();
ResponseList<Location> locations = new ResponseListImpl<Location>(size, json);
for (int i = 0; i < size; i++) {
JSONObject locationJSONObject = list.getJSONObject(i);
Location location = new LocationJSONImpl(locationJSONObject);
if (conf.isJSONStoreEnabled()) {
DataObjectFactoryUtil.registerJSONObject(location, locationJSONObject);
}
locations.add(location);
}