import json


def load_json(path: str):
    """Loads the json file from 'path' into a list of dicts

    Args:
        path (str): The path to the json file

    Raises:
        ValueError: If the provided path does not point to a json file

    Returns:
        dict: A dict of the json file
    """

    if not ".json" in path:
        raise ValueError("'path' is not pointing to a json file")
    data = None
    with open(path) as f:
        data = json.loads(f.read())
    return data