let's say i have a json
array of arrays
String jsonString = [["John","25"],["Peter","37"]];
i would like to parst this into ArrayList<ArrayList<String>>
objects. when i used
Gson.fromJson(jsonString,ArrayList<ArrayList<String>>.class)
it doesn't seem to work and i did a work around by using
Gson.fromJson(jsonString,String[][].class)
is there a better way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…