json直接存入数据库
时间:2021-04-26 13:34:24
收藏:0
阅读:0
1.json对象
JSON.parseObject(jsonObject.get("data").toString(), SettlementList.class);
2.json数组
List<DoctorAdviceRecords> doctorAdviceRecords = JSON.parseArray(jsonObject.get("data").toString(), DoctorAdviceRecords.class); for(DoctorAdviceRecords doctorAdviceRecord : doctorAdviceRecords){ int count = session.insert("doctorAdviceRecords.insert", doctorAdviceRecord); }
评论(0)