I am using the Jackson library for conversion of a JSON string to Java objects
My json is:
{
"human":{
"fname":"anjali",
"lname":"malhotra"
}
}
I want this to be converted into a Java class with following structure:
public class Human
{
String fname;
String lname;
}
I can successfully convert it into
public class HumanWrapper
{
Human human;
}
But, I wanted to know if there is a way I can directly convert it into the Human format. I read about custom deserialization but was reluctant for that approach.