python如何把json字符串按照从上而下写入文件
temp = """{"name": "zhang_san","age": "20"}""" with open('123.json', 'w') as f: f.write(temp)
将json转换成字典,根据遍历key 进行写入文件