📜  如何从 python 代码示例中读取 json

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

代码示例3
#this code helps translate JSON file
#to a dictionary

import json

person = '{"name": "Bob", "languages": ["English", "Fench"]}'
person_dict = json.loads(person)

print( person_dict)

print(person_dict['languages'])