Created
May 6, 2019 12:24
-
-
Save logicjwell/a4adef9ceeed089ad214e60b545dc150 to your computer and use it in GitHub Desktop.
[python3中json的编码和解码] #python3 #json #encode #decode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
在Python3中,将对象序列化为JSON对象,即对对象进行json encode编码,使用函数 | |
json.dumps(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, sort_keys=False, **kw) | |
而将JSON对象反序列化为一个python类型,即对对象进行json decode解码,则使用 | |
json.loads(s, *, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment