Gson deserializes with empty fields
问题 The result variable contains corrected parsed JSON. But after deserialization List contains correct amount of items but all of them are empty. How to fix it? Gson gson = new Gson(); List<UnitView> unitViews = new ArrayList<UnitView>(); // https://stackoverflow.com/questions/5554217/google-gson-deserialize-listclass-object-generic-type Type typeToken = new TypeToken<List<UnitView>>() { }.getType(); unitViews = gson.fromJson(result,typeToken); Even if I do like UnitView[] unitViews = gson