import json

 
with open("config.json""r") as f:
      
your_dict = json.loads(json_str)
 
# get key
 
print(your_dict["key"])
 
或者
with open("config.json""r") as f:
      
# get key
 
print(f.json()["key"])
 
 
posted on 2021-10-14 14:46  Yusco  阅读(162)  评论(0编辑  收藏  举报