JSONArray list = res.asJSONArray();
int size = list.length();
ResponseList<Friendship> friendshipList = new ResponseListImpl<Friendship>(size, res);
for (int i = 0; i < size; i++) {
JSONObject json = list.getJSONObject(i);
Friendship friendship = new FriendshipJSONImpl(json);
if (conf.isJSONStoreEnabled()) {
DataObjectFactoryUtil.registerJSONObject(friendship, json);
}
friendshipList.add(friendship);
}