File size: 292 Bytes
6d923b7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import os
import json
def load_json(path):
with open(path, 'r') as f:
return json.load(f)
def save_json(obj, path):
with open(path, 'w') as f:
json.dump(obj, f, indent=2)
def list_json_files(folder):
return [f for f in os.listdir(folder) if f.endswith('.json')] |