import json


def dumps(resource):
    """Serialize to string

    Parameters
    ----------
    resource : `pyannote.core` data structure

    Returns
    -------
    serialization : string

    """
    return json.dumps(resource, encoding='utf-8', for_json=True)