Gson gson = new Gson();
JSONObject j = new JSONObject(result);
JSONArray array = j.getJSONArray("var");
List<AddressBean> temp = gson.fromJson(array.toString(), new TypeToken<List<AddressBean>>() {
}.getType());
Gson gson = new Gson();
JSONObject j = new JSONObject(result);
JSONArray array = j.getJSONArray("var");
List<AddressBean> temp = gson.fromJson(array.toString(), new TypeToken<List<AddressBean>>() {
}.getType());
本文标题:JsonArray 对象 转list集合
本文链接:https://www.haomeiwen.com/subject/rrtgwxtx.html
网友评论