📅  最后修改于: 2022-03-11 14:46:33.080000             🧑  作者: Mango
#load and print elements of a json file
import json
file = "my_json_file.json"
Json = json.load(open(file)) #Json is a dictionary
print(Json)
#OUTPUT: '{ "name":"John", "age":30, "city":"New York"}'
print("Hello",Json["name"])
#OUTPUT: Hello John