I am getting JSon data from a web service, the sample data is given below:
[ { \"SectionId\": 1, \"SectionName\": \"Android\" } ]
Use Section class only as follows:
Section[] sectionArray = new Gson().fromJson(jsonDataFromWebService, Section[].class); for (Section section: sectionArray) { Log.e("Debug", section.toString()); }