%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.12/json/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.12/json/__pycache__/decoder.cpython-312.pyc

�

���f�0�	���dZddlZddlmZ	ddlmZddgZejejzejzZe
d�Ze
d�Ze
d	�ZGd
�de�Zeeed�Zej(de�Zd
dddddddd�Zd�Zdeej0fd�ZexseZej(de�ZdZdej0efd�Zej0efd�ZGd�de�Zy#e$rdZY��wxYw)zImplementation of JSONDecoder
�N)�scanner)�
scanstring�JSONDecoder�JSONDecodeError�nan�infz-infc��eZdZdZd�Zd�Zy)ra Subclass of ValueError with the following additional properties:

    msg: The unformatted error message
    doc: The JSON document being parsed
    pos: The start index of doc where parsing failed
    lineno: The line corresponding to pos
    colno: The column corresponding to pos

    c���|jdd|�dz}||jdd|�z
}d||||fz}tj||�||_||_||_||_||_y)N�
r�z%s: line %d column %d (char %d))	�count�rfind�
ValueError�__init__�msg�doc�pos�lineno�colno)�selfrrrrr�errmsgs       �#/usr/lib/python3.12/json/decoder.pyrzJSONDecodeError.__init__sv�����4��C�(�1�,���c�i�i��a��-�-��2�c�6�5�#�5N�N�����D�&�)���������������
�c�`�|j|j|j|jffS)N)�	__class__rrr)rs r�
__reduce__zJSONDecodeError.__reduce__*s$���~�~����$�(�(�D�H�H�=�=�=rN)�__name__�
__module__�__qualname__�__doc__rr�rrrrs���	�>r)z	-Infinity�Infinity�NaNz(.*?)(["\\\x00-\x1f])�"�\�/��r�
�	)r$r%r&�b�f�n�r�tc��||dz|dz}t|�dk(r|ddvr
	t|d�Sd}t|||��#t$rY�wxYw)Nr���xX�zInvalid \uXXXX escape)�len�intrr)�sr�escrs    r�
_decode_uXXXXr9;sg��
�C�!�G�C�!�G�
�C�
�3�x�1�}��Q��t�+�	��s�B�<��#�C�
�#�q�#�
&�&���	��	�s�=�	A	�A	Tc���g}|j}|dz
}	|||�}|�
td||��|j�}|j�\}	}
|	r||	�|
dk(rn�|
dk7r)|rdj	|
�}t|||��||
��z	||}|dk7r	||}
|dz
}nht||�}|d	z
}d
|cxkrdkrAnn>|||dzd
k(r3t||dz�}d|cxkrdkrnnd|d
z
dz|dz
zz}|dz
}t|�}
||
���dj|�|fS#t
$rtd||�d�wxYw#t$rdj	|�}t|||��wxYw)a�Scan the string s for a JSON string. End is the index of the
    character in s after the quote that started the JSON string.
    Unescapes all valid JSON string escape sequences and raises ValueError
    on attempt to decode an invalid string. If strict is False then literal
    control characters are allowed in the string.

    Returns a tuple of the decoded string and the index of the character in s
    after the end quote.rNzUnterminated string starting atr$r%z"Invalid control character {0!r} at�uzInvalid \escape: {0!r}r1i�i���z\ui�i��i�
��)
�appendr�end�groups�format�
IndexError�KeyErrorr9�chr�join)r7rA�strict�_b�_m�chunks�_append�begin�chunk�content�
terminatorrr8�char�uni�uni2s                r�
py_scanstringrTEs����F��m�m�G��!�G�E�
��1�c�
���=�!�"C�Q��N�N��i�i�k��#�l�l�n������G������
�4�
��:�A�A�*�M��%�c�1�c�2�2��
�#��	6��C�&�C�
�#�:�
3��#�w��
�1�H�C���3�'�C��1�H�C���&��&�1�S��q��>�U�+B�$�Q��a��0���T�+�V�+�!�s�V�|��&:�t�f�}�%M�N�C��1�H�C��s�8�D���
�W�X�7�7�6�?�C����+�	6�!�"C�"#�U�,�15�
6�	6���
3�/�6�6�s�;��%�c�1�c�2�2�
3�s�D*�E�*E�(E-z
[ \t\n\r]*z 	

c�L�|\}}	g}
|
j}|�i}|j}||	|	dz}
|
dk7r^|
|vr|||	�j�}	||	|	dz}
|
dk(r$|�||
�}||	dzfSi}
|�||
�}
|
|	dzfS|
dk7r
td||	��|	dz
}		t	||	|�\}}	|||�}||	|	dzdk7r/|||	�j�}	||	|	dzdk7r
td||	��|	dz
}		||	|vr&|	dz
}	||	|vr|||	dz�j�}		|||	�\}}	|||f�	||	}
|
|vr|||	dz�j�}	||	}
|	dz
}	|
dk(rnP|
d	k7rtd
||	dz
��|||	�j�}	||	|	dz}
|	dz
}	|
dk7rtd||	dz
����!|�||
�}||	fSt|
�}
|�||
�}
|
|	fS#t
$rY��wxYw#t$r}td||j�d�d}~wwxYw#t
$rd}
Y��wxYw)Nrr$�}z1Expecting property name enclosed in double quotes�:zExpecting ':' delimiter�Expecting valuer?�,�Expecting ',' delimiter)	r@�
setdefaultrArrrD�
StopIteration�value�dict)�	s_and_endrH�	scan_once�object_hook�object_pairs_hook�memo�_w�_wsr7rA�pairs�pairs_append�memo_get�nextchar�result�keyr]�errs                  r�
JSONObjectrm�s���
�F�A�s��E��<�<�L��|������H���S�1�W�~�H��3���s�?��Q��*�.�.�"�C���S�1�W�~�H��s�?� �,�*�5�1���s�Q�w��&��E��&�#�E�*���#��'�>�!�
��_�!�C�Q��M�
M��1�H�C�
��a��f�-���S��s�C� ��
�S��q��>�S� ��Q��*�.�.�"�C���S�1�W�~��$�%�&?��C�H�H��q���	���v��}��q����S�6�S�=��Q��a��.�,�,�.�C�	M�"�1�c�*�J�E�3�	�c�5�\�"�	���v�H��3����C�!�G�n�(�(�*���S�6��	�q����s�?��
��_�!�";�Q��a��H�H���C�j�n�n����S��q��>���q����s�?�!�C�Q��a��Q�
Q�S�V�$�"�5�)���s�{����K�E����E�"���#�:���C�	��	��
�	M�!�"3�Q��	�	�B��L��	M���	��H�	�s<�.-G�G,�3(H�	G)�(G)�,	H�5H
�
H�H#�"H#c�:�|\}}g}|||dz}||vr"|||dz�j�}|||dz}|dk(r||dzfS|j}		|||�\}	}||	�|||dz}||vr"|||dz�j�}|||dz}|dz
}|dk(r	||fS|dk7rtd||dz
��	|||vr&|dz
}|||vr|||dz�j�}��#t$r}
td||
j�d�d}
~
wwxYw#t
$rY�5wxYw)Nr�]rXrYrZ)rAr@r\rr]rD)r_r`rdrer7rA�valuesrirLr]rls           r�	JSONArrayrq�s���
�F�A�s�
�F���S�1�W�~�H��3����C�!�G�n� � �"���S��q��>���3���s�Q�w����m�m�G�
�	M�"�1�c�*�J�E�3�	����S��q��>���s�?��Q��a��.�$�$�&�C���S�1�W�~�H��q����s�?���3�;����_�!�";�Q��a��H�H�	���v��}��q����S�6�S�=��Q��a��.�,�,�.�C�'���	M�!�"3�Q��	�	�B��L��	M��"�	��	�s*�C%�7-D�%	D�.D�D�	D�Dc�L�eZdZdZddddddd�d�Zejfd�Zdd�Zy)	raSimple JSON <https://json.org> decoder

    Performs the following translations in decoding by default:

    +---------------+-------------------+
    | JSON          | Python            |
    +===============+===================+
    | object        | dict              |
    +---------------+-------------------+
    | array         | list              |
    +---------------+-------------------+
    | string        | str               |
    +---------------+-------------------+
    | number (int)  | int               |
    +---------------+-------------------+
    | number (real) | float             |
    +---------------+-------------------+
    | true          | True              |
    +---------------+-------------------+
    | false         | False             |
    +---------------+-------------------+
    | null          | None              |
    +---------------+-------------------+

    It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as
    their corresponding ``float`` values, which is outside the JSON spec.

    NT)ra�parse_float�	parse_int�parse_constantrHrbc� �||_|xst|_|xst|_|xst
j|_||_||_	t|_t|_
t|_i|_t#j$|�|_y)a�``object_hook``, if specified, will be called with the result
        of every JSON object decoded and its return value will be used in
        place of the given ``dict``.  This can be used to provide custom
        deserializations (e.g. to support JSON-RPC class hinting).

        ``object_pairs_hook``, if specified will be called with the result of
        every JSON object decoded with an ordered list of pairs.  The return
        value of ``object_pairs_hook`` will be used instead of the ``dict``.
        This feature can be used to implement custom decoders.
        If ``object_hook`` is also defined, the ``object_pairs_hook`` takes
        priority.

        ``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 datatype or parser
        for JSON floats (e.g. 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 datatype or parser
        for JSON integers (e.g. 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.

        If ``strict`` is false (true is the default), then control
        characters will be allowed inside strings.  Control characters in
        this context are those with character codes in the 0-31 range,
        including ``'\t'`` (tab), ``'\n'``, ``'\r'`` and ``'\0'``.
        N)ra�floatrsr6rt�
_CONSTANTS�__getitem__rurHrbrm�parse_objectrq�parse_arrayr�parse_stringrcr�make_scannerr`)rrarsrtrurHrbs       rrzJSONDecoder.__init__sy��F'���&�/�%���"�)�c���,�F�
�0F�0F������!2���&���$���&�����	� �-�-�d�3��rc��|j|||d�j���\}}|||�j�}|t|�k7r
td||��|S)zlReturn the Python representation of ``s`` (a ``str`` instance
        containing a JSON document).

        r)�idxz
Extra data)�
raw_decoderAr5r)rr7rd�objrAs     r�decodezJSONDecoder.decodeLsW��
�?�?�1�"�Q��(�,�,�.�?�9���S���C�j�n�n����#�a�&�=�!�,��3�7�7��
rc��	|j||�\}}||fS#t$r}td||j�d�d}~wwxYw)a=Decode a JSON document from ``s`` (a ``str`` beginning with
        a JSON document) and return a 2-tuple of the Python
        representation and the index in ``s`` where the document ended.

        This can be used to decode a JSON document from a string that may
        have extraneous data at the end.

        rXN)r`r\rr])rr7rr�rArls      rr�zJSONDecoder.raw_decodeWsQ��	M��~�~�a��-�H�C���C�x����	M�!�"3�Q��	�	�B��L��	M�s��	A�<�A)r)	rrrr r�
WHITESPACE�matchr�r�r!rrrr�s3���:'+���4��"�-4�`&�+�+�	�
r) r �re�jsonr�_jsonr�c_scanstring�ImportError�__all__�VERBOSE�	MULTILINE�DOTALL�FLAGSrwr#�PosInf�NegInfrrrx�compile�STRINGCHUNK�	BACKSLASHr9r�rTr��WHITESPACE_STRrmrq�objectrr!rr�<module>r�s3���	���0��+�
,��
�
�
�R�\�\�!�B�I�I�-���E�l��	�u���	�v���>�j�>�6����
��b�j�j�1�5�9��	�D�s�	
�D�t�$�T�
�	�
'�"&���*�*�9 �z�
*�]�
�
�R�Z�Z�
�u�
-�
����Z�-�-�>�O�b(2�'7�'7�^�"�Jf�&�f��m���L��s�C!�!C+�*C+

Zerion Mini Shell 1.0