luojdz 发表于 2019-11-1 12:29:23

【JSON问题】对于返回的JSON文本,怎么取各个字段的值?

本帖最后由 luojdz 于 2019-11-1 15:37 编辑

{"code":200,"message":"操作成功","data":[{"ATR_KEY":2196928,"SITE_NUM":1,"ATR_NAME":"NOTSET","PURGE_STATUS":0,"CREATION_TIME":"2018-03-26T02:58:04.000+0000","CREATION_TIME_U":"2018-03-25T18:58:04.000+0000","CREATION_TIME_Z":"Asia/Shanghai","LAST_MODIFIED_TIME":"2018-03-26T02:58:04.000+0000","LAST_MODIFIED_TIME_U":"2018-03-25T18:58:04.000+0000","LAST_MODIFIED_TIME_Z":"Asia/Shanghai","DM_INSERT_ID":177,"DM_UPDATE_ID":177,"TRX_ID":"{45FAF641-5BB5-912F-B58E-644E448372A2}","PARENT_KEY":0,"COLUMN_1_S":null,"FACTORY_CODE_S":"1100","MEMO_S":null,"PART_NAME_S":"离合器从动盘总成","PART_NO_S":"1600011","PIC_NO_S":"1600011","UNIT_S":"EA","HH":1},{"ATR_KEY":2196930,"SITE_NUM":1,"ATR_NAME":"NOTSET","PURGE_STATUS":0,"CREATION_TIME":"2018-03-26T02:58:04.000+0000","CREATION_TIME_U":"2018-03-25T18:58:04.000+0000","CREATION_TIME_Z":"Asia/Shanghai","LAST_MODIFIED_TIME":"2018-03-26T02:58:04.000+0000","LAST_MODIFIED_TIME_U":"2018-03-25T18:58:04.000+0000","LAST_MODIFIED_TIME_Z":"Asia/Shanghai","DM_INSERT_ID":177,"DM_UPDATE_ID":177,"TRX_ID":"{F8EFA028-0CD1-C277-F4D8-D01668C5E17B}","PARENT_KEY":0,"COLUMN_1_S":null,"FACTORY_CODE_S":"1100","MEMO_S":null,"PART_NAME_S":"离合器压盘总成","PART_NO_S":"1600012","PIC_NO_S":"1600012","UNIT_S":"EA","HH":2}]}以上 是从数据库中间件返回的JSON文本
请问,怎么取出各字段的值?

luojdz 发表于 2019-11-1 17:04:21


我已经自己解决了。 研究了一下午。






创世魂 发表于 2019-11-1 21:12:25

参考json图文教程:http://doc.voldp.com/j_json.htm
页: [1]
查看完整版本: 【JSON问题】对于返回的JSON文本,怎么取各个字段的值?