Given the following json:
{
"User":{
"firstname":"john",
"gender":"female",
"verified":"no"
}
}
Is there a way to remove/ignore "User" node so I can use the jackson bind ? You see, at the moment if I try and do this:
User user= mapper.readValue(content, User.class); //where content is the json above
where User class is:
public class User
{
String _firstname, _gender, _verified;
[getters and setters]
}
it gives an error saying:
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "User"
I know I can just initialise the User class and just do setters manually but I was wondering if it is possible or better to remove/ignore the "User" node instead?