import pathlib
import json


def save(data: dict, path: pathlib.Path) -> bool:
    """Save a provided dictionary to file in json.
    
    Parameters
    ----------
    data : dict
        The dictionary to be saved to file.
    path : pathlib.Path
        The path to the file to be saved. This path should included the
        file name, and any file extensions you wish, but ideal use the
        .json extension for transparency.

    Returns
    -------
    bool,
        Returns true if the save opperation terminated without error.
    """

    with open(path, 'w') as fp:
        json.dump(data, fp, indent=4, sort_keys=True)

    return True