NutzCN Logo
问答 从前台拿到了一个字符串,怎么转换为List<map>
发布于 2526天前 作者 qq_7fafbecc 2300 次浏览 复制 上一个帖子 下一个帖子
标签:

字符串的内容:

[{"mixId":"PX20170410.XK.1001","tkDetailSno":0,"sno":3810,"bagCode":"0100000000032^P0004V00","bdCode":"P0004","spec":"1,000","unit":"1","isReturned":"0","mixMethod":"1","mixResult":"1","isBdXyYz":"1","pxer":"0001","pxTime":"2017-04-10 17:16:30.5","isFx":"0","isCosted":"0","fcXyCode":"2","isMixCosted":"0","outPutPrice":230,"isConfirmed":"1","confirmUser":"0001","comfirmTime":"2017-04-10 17:16:55","isRemove":"0","pxerText":"管理员","confirmUserText":"管理员","fxStepFlag":"1","patientInId":"2015021370001","patientName":"包杰","gender":"1","age":78,"xyCode":"2","ageFlag":"1","deptCode":"1010100","wardCode":"1010102","bedNo":"0807","xyCodeBag":"2","ticketId":6329},{"mixId":"PX20170329.XK.1000","tkDetailSno":0,"sno":3809,"bagCode":"0180716010906^P0147VA0","bdCode":"P0147","spec":"50","unit":"1","isReturned":"0","mixMethod":"4","mixResult":"4","isBdXyYz":"1","pxer":"0001","pxTime":"2017-04-10 11:26:16.547","isFx":"0","isCosted":"1","fcXyCode":"2","isMixCosted":"0","outPutPrice":25,"isConfirmed":"1","confirmUser":"0001","comfirmTime":"2017-04-10 11:31:50","isRemove":"0","pxerText":"管理员","confirmUserText":"管理员","fxStepFlag":"1","patientInId":"2015015410001","patientName":"韦述友","gender":"1","age":81,"xyCode":"2","ageFlag":"1","deptCode":"1010100","wardCode":"1010102","bedNo":"0801","xyCodeBag":"2","ticketId":6334}]

代码:

List<Map> fxBags = new ArrayList<Map>();
    String xx = map.get("fxBags").toString();
3 回复

Json.fromJsonAsList

这是json串, 先转成对象再处理

先转成json数组,再遍历就可以

添加回复
请先登陆
回到顶部