import json import os def load_json(file_path): with open(file_path, 'r', encoding='utf-8') as f: return json.load(f) def save_json(data, file_path): with open(file_path, 'w', encoding='utf-8') as f: json.dump(data, f, ensure_ascii=False, indent=4)