This is more of a concept question than an actual code question but can you deserialize just part of a JSON String into an object or do you have create a class and a sub class for the whole thing. So lets say I have a JSON response like:
{
"employee": {
"name": "sonoo",
"salary": 56000,
"married": true
}
}
If I wanted to just get data for say just salary could I create a class like this and it still work properly?
public class Employee {
public Integer salary;
}