I have problem parsing dynamic JSON field name with GSON into Java Object. I have JSON like this:
{
...
"field_basic": "12.3",
"field_basic_country": "12.3",
"field_ex4": "2.7",
...
}
Field field_ex4 can have different names like field_ex1, field_ex2... I don't want to make all the atributes in Java class like this:
private String field_ex1;
private String field_ex2;
private String field_ex3;
private String field_ex4;
...
So my question is if there is posibility that this field is parsed into one universal filed name (like "field_exN") and that I also would know what values N is. There is always just one field_ex in JSON.
Thank you.