android - How can I store my JSON array elements in variables? -


here json array having sub array in it. want store data of sub array in arranged manner in android. first record other,etc..how can this?

{     "result": [         ["", "", "2016-04-22", "", "", "problems since last 5 days", "replace piping", "0", null],         ["elec4820", "", "2016-04-25", "", "", "jsjshdjdjjcncnc", "hdjdhdhfbbff", "0", null],         ["elec7558", "", "2016-04-25", "", "", "jsjshdjdjjcncnc", "hdjdhdhfbbff", "0", null],         ["gara8118", "11827", "2016-03-13", "completed", "nknm", "too garbage near front gate causing unbearable stink.", "garbage ", "0", null],         ["nois6091", "17061", "2016-03-11", "assigned", "committee member has been assigned solve problem", "too noise caused construction carried out by....ccd . .dvdv efv \r\nvvevv ", "cdhvdhb bbcsjc cincs nenvnjk \r\nvndjkn n cnicjisk m \r\niejnivn vvnveivnievnj invjievivn \r\nvienvncn", "1", null],         ["wate6487", "14371", "2016-03-14", "in-progress", "gyghbn", "fegrtb fbvrv ", "ss", "1", null]     ] } 

your model class must that:

public class example {  @serializedname("result") @expose private list<list<string>> result = new arraylist<list<string>>();  /** *  * @return * result */ public list<list<string>> getresult() { return result; }  /** *  * @param result * result */ public void setresult(list<list<string>> result) { this.result = result; }  } 

after, read documentation of gson this: https://github.com/google/gson


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -