异常
cn.hutool.json.JSONException: Expected a ',' or '}' at 43 [character 1 line 5] at cn.hutool.json.JSONTokener.syntaxError(JSONTokener.java:396) at cn.hutool.json.JSONObject.init(JSONObject.java:771) at cn.hutool.json.JSONObject.init(JSONObject.java:723) at cn.hutool.json.JSONObject.init(JSONObject.java:683)
json字符串 {"code":0, "msg":"", "hospitalId":2002181 "branchId":"", "DayList":[{ "deptCode":"01", "deptName":"急诊科", "doctorCode":"8141", "doctorName":"王xx", "sittingDay":"2021-01-09", "ampm":"0", "startTime":"2021-01-09 08:00:00", "endTime":"2021-01-09 11:00:00", "number":"1000", "payNumber":"0", "waitPayNumber":"0", "price":"4.400000", "regType":"", "isDel":"1", "regId":"96" },{ "deptCode":"01", "deptName":"急诊科", "doctorCode":"8147", "doctorName":"谢xx", "sittingDay":"2021-01-09", "ampm":"1", "startTime":"2021-01-09 14:30:00", "endTime":"2021-01-09 17:00:00", "number":"1000", "payNumber":"0", "waitPayNumber":"0", "price":"4.400000", "regType":"", "isDel":"1", "regId":"233" }] }
java中转化出现异常,看不异常。只是知道json格式错误。
可以获取到json字符串到在线工具中进行校验
地址:http://www.jsons.cn/#0-sqq-1-83869-9737f6f9e09dfaf5d3fd14d775bfee85
校验到时候会直接显示