actually I'm struggeling with parsing the following JSON doc: LINK
I have a class which is saving the content in a String (rawData). After that I want to parse it with Gson.
DownloadedCategories dcats = new Gson().fromJson(rawData, DownloadedCategories.class);
My goal is to have a List of an extra datatype of the 21 main categories, and in the extra datatype saved in another List the subcategories.
My approach was to create the new datatype mainCategory which includes the List of the subcategories.
The problem is that i can't do the DownloadedCategories class like this:
public class DownloadedCategories
{
private List<mainCategories> categories;
public List<mainCategories> getCategories;
{
return categories;
}
}
Has someone an idea how to fix my issue?