[
{
"id":"1",
"cardtype":"",
"customer":{
"id":"11",
"custnum":"aa"
},
"department":{
"id":"201",
"depnum":"dep1"
}
},
{
"id":"2",
"cardtype":"",
"customer":{
"id":"11",
"custnum":"aa"
},
"department":{
"id":"201",
"depnum":"dep1"
}
},
{
"id":"3",
"cardtype":"",
"customer":{
"id":"11",
"custnum":"aa"
},
"department":{
"id":"201",
"depnum":"dep1"
}
}
]
json 格式如上,试过很多写法,都不大适合,求解。
Type founder = new TypeToken<ArrayList<bean>>(){}.getType(); List<bean> founder = gson.fromJson(jsonstring, founder);
这样的写法也不行。