def datetime_to_string(value):
    """Converts the given datetime into an appropriate ISO-8601 string format for JSON

    :param value: The datetime to convert
    :type value: :class:`datetime.datetime`
    :returns: The ISO-8601 string format
    :rtype: string
    """

    return value.isoformat().replace('+00:00', 'Z')