import json
if name == '__main__':
jsonStr = input("请您输入一个Json字符串列表\n")
if jsonStr !="":
resultList = json.loads(jsonStr)
file = open("手机.json",mode="w",encoding="UTF-8")
for m in resultList:
content = m["name"]+"价格为:"+m["price"]+"\n"
file.write(content)
file.close()