I'm trying to simply get values from my Gson Object, so in my "city" Object:
I need to get the name "first" and the boolean value from "isSelected".
I just wrote a new class "KeyPairBoolData":
class KeyPairBoolData {
int id;
String name;
boolean isSelected;
}
but I have no idea what should I write in the new class to get these values, here is how I'm trying to get it:
List<KeyPairBoolData> city = gson.fromJson(myListArray, listArray.getClass());
any idea? Thanks!