JSON获取JSONArray转java--list

String httpPost4Instream1 = http1.httpPost4Instream
JSONObject jsonbject1 = JSONObject.fromObject(httpPost4Instream1);
JSONArray jsonArray1 = jsonbject1.getJSONArray("models");
@SuppressWarnings("all")
List list = (List)JSONArray.toList(jsonArray1, StoreDevices.class);
param.setDevices(list);

你可能感兴趣的:(java)