# 先导入json模块import json# 读取文件使用 with open( file_path, "模式", "编码格式") as ..# file_path是文件地址, 模式有 只读r,只写w,读写r+,编码格式默认utf-8withopen("./唐诗.json", mode="r", encoding="utf-8") asfile: # file.read() 为读取文件;json.loads() 为加载json数据 data = json.loads(file.read())# 最后打印出读出的数据 data print(data)