Objects and map it to a Java Object directly. The problem is that the member variables all exist within the same level but there's a nested object in the JSON data. How do I map it?
For example. The JSON template is as follows { name: { firstName, lastName }, age} and my instance object is as {firstName, lastName, age} how do I map the JSON to my object? Currently only age member variable is getting set properly, the other two are null.
In this case you need to create custom deserializer.
Обсуждают сегодня