Files
Auto_Bangumi/AutoBangumi/app/utils/json_config.py
Sean 2e3e75bb0b refactor
- 区分 Consts 和 Settings,取代 Env
- 独立 downloader module,为便于后续提供多下载器支持
- 加入命令行选项,提供 debug 模式
- 其他细节
2022-06-02 15:15:21 +08:00

13 lines
283 B
Python

import json
def load(filename):
with open(filename, "r", encoding="utf-8") as f:
return json.load(f)
def save(filename, obj):
with open(filename, "w", encoding="utf8") as f:
json.dump(obj, f, indent=4, separators=(",", ": "), ensure_ascii=False)
pass