def paths_to_j(path_dict):
    """ Takes a candidate paths dictionary and converts it to a JSON serializable form.

        Parameters
        ----------
        path_dict : dictionary
            a dictionary indexed by a node pair whose value is a list of paths, where each path
            is a list of nodes.

        Returns
        -------
        list_dict : list
            a list of dictionaries that can readily be converted to JSON with the json
            standard library routines.
    """
    tmp = []  # We'll use a list
    for k in path_dict.keys():
        tmp.append({"source": k[0], "target": k[1], "paths": path_dict[k]})
    return tmp