本文共 455 字,大约阅读时间需要 1 分钟。
try { JSONObject jsonObject = new JSONObject(dataStr); String jsonarray = jsonObject.getString("data"); Type listType = new TypeToken>() { }.getType(); List listapp = new ArrayList<>(); Gson gson = new Gson(); contactBookLists.clear(); listapp = gson.fromJson(jsonarray, listType); contactBookLists.addAll(listapp); resetData(contactBookLists); } catch (JSONException e) { e.printStackTrace();}
转载地址:http://lbuy.baihongyu.com/