一、jsonpath的安装
pip install jsonpath
二、使用举例
import jsonpath d1={"token":"hjshdsjhdsjadhsa","expire":"7200"} print( jsonpath.jsonpath(d1,'$.token')[0])
输出的值为:
pip install jsonpath
import jsonpath d1={"token":"hjshdsjhdsjadhsa","expire":"7200"} print( jsonpath.jsonpath(d1,'$.token')[0])
输出的值为: