代码拉取完成,页面将自动刷新
import UniversalParser as UP
json_data = """
{
"message": null,
"value": [
{
"naturalid": null,
"name": "龚亮",
"phone": "18693517091",
"djxh": "10216223000000009540",
"nsrmc": null,
"nsrsbh": null,
"isBinding": "Y",
"roleType": "5",
"sqlxDm": null,
"sqztDm": null,
"lcslid": "",
"sqczsfzjhm": null,
"bsrysfzjhm": "62230119910409877X",
"realName": true
},
{
"naturalid": null,
"name": "龚亮",
"phone": "18693517091",
"djxh": "10216223000000009540",
"nsrmc": null,
"nsrsbh": null,
"isBinding": "Y",
"roleType": "6",
"sqlxDm": null,
"sqztDm": null,
"lcslid": "",
"sqczsfzjhm": null,
"bsrysfzjhm": "62230119910409877X",
"realName": true
},
{
"naturalid": null,
"name": "龚亮",
"phone": "18693517091",
"djxh": "10216223000000009540",
"nsrmc": null,
"nsrsbh": null,
"isBinding": "Y",
"roleType": "9",
"sqlxDm": null,
"sqztDm": null,
"lcslid": "",
"sqczsfzjhm": null,
"bsrysfzjhm": "62230119910409877X",
"realName": true
},
{
"naturalid": null,
"name": "龚亮",
"phone": "18693517091",
"djxh": "10216223000000009540",
"nsrmc": null,
"nsrsbh": null,
"isBinding": "Y",
"roleType": "10",
"sqlxDm": null,
"sqztDm": null,
"lcslid": "",
"sqczsfzjhm": null,
"bsrysfzjhm": "62230119910409877X",
"realName": true
},
{
"naturalid": null,
"name": "李春兰",
"phone": "13689353360",
"djxh": "10216223000000009540",
"nsrmc": null,
"nsrsbh": null,
"isBinding": "Y",
"roleType": "11",
"sqlxDm": null,
"sqztDm": null,
"lcslid": "",
"sqczsfzjhm": null,
"bsrysfzjhm": "622326197701140022",
"realName": true
}
],
"success": true,
"msgCode": null,
"resultMap": {},
"msgParams": null,
"jylsh": "e087e96026ce4079979f0cd7d7db26d6"
}
"""
jsonManager = UP.parse_json(json_data, real_cdata_key='string')
_text = jsonManager.find_text
status = jsonManager.find_nodes_by_tag('success', one_=True)
print(_text(status)) # True
print(status.string) # True
values = jsonManager.find_nodes_by_tag('value')
print(values[-1].name) # 李春兰
print(jsonManager.document.root.jylsh) # e087e96026ce4079979f0cd7d7db26d6
jsonManager.save_as_xml()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。