convert value to JSON
    :param value:
    :param pretty:
    :return:

def json(value, pretty=True):
    """
    convert value to JSON
    :param value:
    :param pretty:
    :return:
    """
    if not _Duration:
        _late_import()
    return _json_encoder(value, pretty=pretty)