jsonpath: 语法类似xpath,尝试指定范围获取所有符合条件的key,返回类型:list
import json
import jsonpath
jsonpath.jsonpath({'annunciateID': 70,'content': {'ID': 70}}, "$..ID")
get 字典方法,尝试获取key,没有返回指定内容,默认为空
>>> text = {"c":1, "a":1}
>>> richtext2 = text.get('t', "")
>>>
>>> richtext1
1
>>> richtext2
''