import json


def _json_to_dict(json_path):
    """
    Parse JSON file content.

    Parameters
    ----------
    json_path : str or pathlib.Path
        Path to JSON file.

    Returns
    -------
    dict
        Dynophore data with the following keys and nested keys (key : value data type):
        - id : str
        - ligand_name : str
        - ligand_smiles : str
        - ligand_mdl_mol_buffer : str
        - ligand_atom_serials : str
        - superfeatures : list
            - id : str
            - feature_type : str
            - atom_numbers : list of int
            - occurrences : list of int
            - envpartners : list
                - id : str
                - name : str
                - atom_numbers : list of int
                - occurrences : list of int
                - distances : list of float
    """

    with open(json_path, "r") as f:
        json_string = f.read()
        dynophore_dict = json.loads(json_string)

    return dynophore_dict