vsg_eval / utils /io.py
royguw's picture
Add files using upload-large-folder tool
6d923b7 verified
Raw History Blame Contribute Delete
292 Bytes
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')]