import json


def read_json(path: str) -> dict:
    """read a json as a dictionary

    Args:
        path (str): path to a json file

    Returns:
        dict: the dictionary read from a json file
    """
    try:
        with open(path, "r") as openfile:
            json_object = json.load(openfile)
    except Exception as err:
        raise RuntimeError(f"Unable to read json: {err}")

    return json_object