import json with open('data.json','w+') as f: json.dump({"name":"张彪"},f)
import json with open('data.json','r') as f: x=json.load(f) print(x,type(x))