import json
from pathlib import Path


def save_json(dictionary: dict, path: Path):

    json_string = json.dumps(dictionary)
    FILE = open(path, "w")
    FILE.write(json_string)
    FILE.close()


def load_json(path: Path) -> dict:
    FILE = open(path, "r")
    json_string = FILE.read()
    FILE.close()

    return json.loads(json_string)
