json=json.dumps(字典) #这一步是把字典转为字符串 with open('vcyber.json','w') as f: f.write(jsoncookies) #这一步是把字符串写入文件,并保存为json格式