path=''#json文件的地址
with open(path,'r',encoding='utf-8') as file:
content=file.read()#读取json文件
new_content=content.replace('原','新')
with open(path,'w',encoding='utf-8') as file:
file.write(new_content)
把json里的特定文字换成新的文字
path=''#json文件的地址
with open(path,'r',encoding='utf-8') as file:
content=file.read()#读取json文件
new_content=content.replace('原','新')
with open(path,'w',encoding='utf-8') as file:
file.write(new_content)
把json里的特定文字换成新的文字