import pprint


def to_nice_json(data, ident: int = 4):
    """
    to_nice_json Helper to render JSON in logs

    Leverage pprint to help to render JSON as a nice output

    Parameters
    ----------
    data : any
        Data to nicely render with PPRINT
    ident : int, optional
        Number of space to use for indentation, by default 4

    Returns
    -------
    str
        String to print
    """
    return pprint.pformat(data, indent=ident)