简单介绍:
此模块儿常用来完成python对象和json字符串的相互转换
常用方法:
json.dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, encoding='utf-8', default=None, **kw) -> None
说明:把obj dump序列化写入文件
json.dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, encoding='utf-8', default=None, **kw) -> strs
说明:把obj dump序列化成为字符串
json.load(fp, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, **kw) -> obj
说明:加载file文件反序列化成序列化前的obj
json.loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, **kw) -> obj
说明:加载file文件反序列化成序列化前的obj
来源:oschina
链接:https://my.oschina.net/u/2612057/blog/621713