import json


def loadJson(path: str):
    """
    Loads json from path

    Returns
    -------
    `tuple(data or exception, True or False)` :
        First item is the json data from the path if it succeeds, else it's an exception. Same thing goes for the second tuple.
    """

    try:
        with open(path) as f:
            return json.load(f), True
    except Exception as e:
        return e, False