from datetime import datetime


def parse_time(value: str) -> datetime:
    """Parse and convert JSON encoded string to a datetime object

    Parses a ``str`` and converts it to a ``datetime`` object. If the string is
    not a valid JSON (JavaScript) encoded datetime object, this function will
    return the minimum datetime value (``datetime.min``).

    :param value: The string value to parse
    :type value: str

    :returns datetime: A ``datetime`` version of the provided JSON-time string
    """

    try:
        return datetime.strptime(value, "%Y-%m-%dT%H:%M:%SZ")
    except ValueError:
        return datetime.min