例如:数据库存储
String a =[{"path":"/profile/upload/887215886851.png","name":"1.png"}, {"path":"/profile/upload/1a5c2693d519.png","name":"2.png"}, {"path":"/profile/upload/4da7f1941894.docx","name":"3 DOCX 文档.docx"}]
String转JSON数组
JSONArray ja=JSONArray.parseArray(a);
后端可通过
ja.get(下标)//访问
前端按照数组调用使用
2.jsonString 转List<实体类>
List<handleSearchVo> getList1 =JSONArray.parseArray(getHandleSearchList,handleSearchVo.class);
getHandleSearchList
为jsonString ,