if your object has a dynamic name inside, let's say this:
{ "Includes": { "Products": { "blablabla": { "CategoryId": "this is category id", "Description": "this is description", ... }
You can serialize it with:
MyFunnyObject data = new Gson().fromJson(jsonString, MyFunnyObject.class);
@Getter @Setter class MyFunnyObject { Includes Includes; class Includes { Map<String, Products> Products; class Products { String CategoryId; String Description; } } }
later you can access it:
data.getIncludes().get("blablabla").getCategoryId()
source share