I'm building a client server web application and stuck on this:
I'm getting an array of users "FriendsIDList:":
"data":{
"name":"anna",
"BirthDate":"2010-01-01",
"FriendsIDList":{
"email":"anna1@gmail.com",
"email":"anna2@gmail.com"
}
}}
Without the array I have no problem reading the data like this:
GsonBuilder gb = new GsonBuilder();
gb.setDateFormat("yyyy-MM-dd");
gson = gb.create();
newUser= gson.fromJson(data, user.class);
How can I read this array? I'm using LinkedList
in my user class:
LinkedList FriendsIDList;