将json数据转换成实体类和结合
开发中遇到的问题
前端传的json数据是 {"ditId":null,"imgUrl":"woman.png","type":1,"dataId":null,"dataName":"小叮当2","px":"24","py":"48","lng":null,"lat":null,"smdId":null,"createTime":null,"directionFlag":1}
然后后端解析返回的是List集合,导致解析失败。 正确的json数据应该传入数组 [{"ditId":null,"imgUrl":"woman.png","type":1,"dataId":null,"dataName":"小叮当2","px":"24","py":"48","lng":null,"lat":null,"smdId":null,"createTime":null,"directionFlag":1}]
一个【】引发的bug