📜  python json替换字符串 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:05.260000             🧑  作者: Mango

代码示例1
with open('file.json', 'r+') as file:
    content = file.read()
    file.seek(0)
    content.replace('string_replaced', 'new_string')
    file.write(content)