# coding=utf-8
import json
#json.load
with open("douban.json","r",encoding="utf-8") as f: #f就是一个类文件对象
t = json.load(f)
print(type(t))
#json.dump
with open("douban1.json","w",encoding="utf-8") as f:
json.dump(t,f,indent=2,ensure_ascii=False)
import json
#json.load
with open("douban.json","r",encoding="utf-8") as f: #f就是一个类文件对象
t = json.load(f)
print(type(t))
#json.dump
with open("douban1.json","w",encoding="utf-8") as f:
json.dump(t,f,indent=2,ensure_ascii=False)