📜  python 对象到 json 文件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:08.826000             🧑  作者: Mango

代码示例4
import json

# some JSON:
x =  '{ "name":"John", "age":30, "city":"New York"}'

# parse x:
y = json.loads(x)

# the result is a Python dictionary:
print(y["age"])