JSON转换:实体类和JSONObject互转,List和JSONArray互转(fastjson版)
1.实体类和JSONObject互转//实体类转为JSONObjectJSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(xtDmbm));//JSONObject转为实体类XtDmbm xtDmbm = JSONObject.toJavaObject(jsonObject, XtDmbm.class);2.List<T>和JSONArray互转//List转为JSONArrayJSONArra
原创
2022-02-16 10:21:26 ·
22341 阅读 ·
5 评论