import jsonpath import json data = "{\"a\": \"11\", \"c\": {\"a\": true}}" data = json.loads(data) expr = "$.c.a" expr_1 = "$.c.b" result = jsonpath.jsonpath(data, expr) result_1 = jsonpath.jsonpath(data, expr_1) print(result) print(result_1)
需要注意的是:
原文地址:https://www.cnblogs.com/chenadong/p/10854015.html
时间: 2024-11-07 01:37:44