Deserializes the given value from JSON.

    :param value: the value to deserialize
    :type value: str
    :param native_datetimes:
        whether or not strings that look like dates/times should be
        automatically cast to the native objects, or left as strings; if not
        specified, defaults to ``True``
    :type native_datetimes: bool

def from_json(value, native_datetimes=True):
    """
    Deserializes the given value from JSON.

    :param value: the value to deserialize
    :type value: str
    :param native_datetimes:
        whether or not strings that look like dates/times should be
        automatically cast to the native objects, or left as strings; if not
        specified, defaults to ``True``
    :type native_datetimes: bool
    """

    hook = BasicJsonDecoder(native_datetimes=native_datetimes)
    result = json.loads(value, object_hook=hook)
    if native_datetimes and isinstance(result, string_types):
        return get_date_or_string(result)
    return result