Json库
# Json库
# 序列化和反序列化
反序列化,不带s是文件流用的
loads
Deserialize
s(astr,bytesorbytearrayinstance containing a JSON document) to a Python object.
load
Deserialize
fp(a.read()-supporting file-like object containing a JSON document) to a Python object.
序列化,不带s是文件流用的
dumps
Serialize
objto a JSON formattedstr.
dump
Serialize
objas a JSON formatted stream tofp(a.write()-supporting file-like object).