12 lines
No EOL
287 B
Python
12 lines
No EOL
287 B
Python
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) |