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