o
    q!ågÿ  ã                   @   sR   d dl mZ ddlmZ ddlmZ 	 g d¢ZdZ		dd	d
„Z		 ddd„Z	dS )é    )Úabsolute_importé   )ÚError)ÚDirtyJSONLoader)ÚloadÚloadsr   z&Scott Maxwell <scott@codecobblers.com>NFc                 C   s   t |  ¡ |||||ƒS )a¼  Deserialize ``fp`` (a ``.read()``-supporting file-like object containing
    a JSON document) to a Python object.

    *encoding* determines the encoding used to interpret any
    :class:`str` objects decoded by this instance (``'utf-8'`` by
    default).  It has no effect when decoding :class:`unicode` objects.

    Note that currently only encodings that are a superset of ASCII work,
    strings of other encodings should be passed in as :class:`unicode`.

    *parse_float*, if specified, will be called with the string of every
    JSON float to be decoded.  By default, this is equivalent to
    ``float(num_str)``. This can be used to use another data type or parser
    for JSON floats (e.g. :class:`decimal.Decimal`).

    *parse_int*, if specified, will be called with the string of every
    JSON int to be decoded.  By default, this is equivalent to
    ``int(num_str)``.  This can be used to use another data type or parser
    for JSON integers (e.g. :class:`float`).

    *parse_constant*, if specified, will be called with one of the
    following strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``.  This
    can be used to raise an exception if invalid JSON numbers are
    encountered.
    )r   Úread)ÚfpÚencodingÚparse_floatÚ	parse_intÚparse_constantÚsearch_for_first_object© r   úT/mnt/skqttb/ctump_chatbot/chatbot/lib/python3.10/site-packages/dirtyjson/__init__.pyr   #   s   ÿr   c                 C   s   t | ||||ƒ}| ||¡S )a³  Deserialize ``s`` (a ``str`` or ``unicode`` instance containing a JSON
    document) to a Python object.

    *encoding* determines the encoding used to interpret any
    :class:`str` objects decoded by this instance (``'utf-8'`` by
    default).  It has no effect when decoding :class:`unicode` objects.

    Note that currently only encodings that are a superset of ASCII work,
    strings of other encodings should be passed in as :class:`unicode`.

    *parse_float*, if specified, will be called with the string of every
    JSON float to be decoded.  By default, this is equivalent to
    ``float(num_str)``. This can be used to use another data type or parser
    for JSON floats (e.g. :class:`decimal.Decimal`).

    *parse_int*, if specified, will be called with the string of every
    JSON int to be decoded.  By default, this is equivalent to
    ``int(num_str)``.  This can be used to use another data type or parser
    for JSON integers (e.g. :class:`float`).

    *parse_constant*, if specified, will be called with one of the
    following strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``.  This
    can be used to raise an exception if invalid JSON numbers are
    encountered.
    )r   Údecode)Úsr
   r   r   r   r   Ústart_indexÚdr   r   r   r   B   s   r   )NNNNF)NNNNFr   )
Ú
__future__r   Úerrorr   Úloaderr   Ú__all__Ú
__author__r   r   r   r   r   r   Ú<module>   s    
ÿÿ