json也称为 javascript object notation
格式如下所示:
>>> my_json={‘name’:’Python’,’address’:{‘porvince’:’吉林’,’city’:[‘长春’,’吉林’]}}
>>> my_json
{‘name’: ‘Python’, ‘address’: {‘porvince’: ‘吉林’, ‘city’: [‘长春’, ‘吉林’]}}
>>> print(my_json[‘name’])
Python
>>> my_json
{‘name’: ‘Python’, ‘address’: {‘porvince’: ‘吉林’, ‘city’: [‘长春’, ‘吉林’]}}
>>> my_json[‘address’]
{‘porvince’: ‘吉林’, ‘city’: [‘长春’, ‘吉林’]}
>>>
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/280364.html