I am trying to load my Json into my class
public User() {
this.fbId = 0;
this.email = "";
this.name = "";
this.thumb = "";
this.gender = "";
this.location = "";
this.relationship = null;
this.friends = new ArrayList();
}
{
users:{
user:{
name:'the name',
email:'some@email.com',
friends:{
user:{
name:'another name',
email:'this@email.com',
friends:{
user:{
name:'yet another name',
email:'another@email.com'
}
}
}
}
}
}
}
I am struggling to get GSON to load the user details into the above Java object with the following code
User user = gson.fromJson(this.json, User.class);