1.开发中常用到json字符串和list转换@H_403_3@
js中传入的参数JSON.stringify({"data":datas });
@H_403_3@
params为传入的json字符串参数@H_403_3@
String data = params.getString("data");
@H_403_3@
List<Object> obejctList =JSONArray.parseArray(data,Object.class);@H_403_3@
2.json字符串转Object@H_403_3@
@H_403_3@
JSONObject json = new JSONObject();
@H_403_3@
Object obj = JSON.parSEObject(json.getString("data"),Object.class);@H_403_3@ 原文链接:https://www.f2er.com/json/288773.html