Trying out Gson for the first time instead of looping through the JSON objects for speed.
This is my input data set for parsing
{
  "data": [
    {
      "access_token": "XXXXX", 
      "category": "Community", 
      "name": "Startup notes by Vrashabh", 
      "id": "XXXXX", 
      "perms": [
        "ADMINISTER", 
        "EDIT_PROFILE", 
        "CREATE_CONTENT", 
        "MODERATE_CONTENT", 
        "CREATE_ADS", 
        "BASIC_ADMIN"
      ]
    }, 
    {
      "access_token": "XXXX", 
      "category": "Community", 
      "name": "Clean Bangalore", 
      "id": "XXXXX", 
      "perms": [
        "ADMINISTER", 
        "EDIT_PROFILE", 
        "CREATE_CONTENT", 
        "MODERATE_CONTENT", 
        "CREATE_ADS", 
        "BASIC_ADMIN"
      ]
    }, 
    {
      "access_token": "XXXXX", 
      "category": "Internet/software", 
      "name": "Getmeetin", 
      "id": "XXXXX", 
      "perms": [
        "ADMINISTER", 
        "EDIT_PROFILE", 
        "CREATE_CONTENT", 
        "MODERATE_CONTENT", 
        "CREATE_ADS", 
        "BASIC_ADMIN"
      ]
    }
  ], 
  "paging": {
    "cursors": {
      "before": "MTU3MzE3MTA0MjkyMjY4MQ==", 
      "after": "MjcyMTIwMzE2Mjk3NzI5"
    }
  }
}
And this is my gson mapping class
public class AccountsResponse {
    ArrayList<AcResponseData> data;
    ArrayList<PagingData> paging;
    public class AcResponseData {
        public String access_token;
        public String category;
        public String name;
        public String id;
        public String[] perms;
    }
    public class PagingData{
        public Cursors cursors;
    }
    public class Cursors{
        public String before;
        public String after;
    }
}
Code for parsing the data
AccountsResponse responseAccounts = gsonResponse.fromJson(response.getRawResponse(), AccountsResponse.class);
I Know I am supposed to not expect magic in terms of data conversion, I found the other questions on SO that ask me to implement TypeToken but I couldn't get it working for this case. How do I use TypeToken to get this data into the ORM I wouldn't mind not reading that paging data also actually, if that needs to be eliminated from the ORM
UPDATE Changed the ORM as below but now I get
java.lang.StackOverflowError
 
     
    