IOS

JSON String to Android class object conversion using GSON

JSON Array conversion

Gson gson = new Gson();
List globalDataListModelArrayList = new ArrayList();
globalDataListModelArrayList = Arrays.asList(gson.fromJson(matterEditModels.get(position).getGlobalDataList(), GlobalDataListModel[].class));




JSON Object conversion

Gson gson = new Gson();
GlobalDataListModel globalDataListModelArrayList = new GlobalDataListModel();
globalDataListModelArrayList = gson.fromJson(matterEditModels.get(position).getGlobalDataList(), GlobalDataListModel[].class);

	
		

Leave a Reply

Your email address will not be published. Required fields are marked *

July 2020
M T W T F S S
« Apr   Sep »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Site Statistics

  • Users online: 0 
  • Visitors today : 6
  • Page views today : 6
  • Total visitors : 2,876
  • Total page view: 3,222