AlkantarClanX12

Your IP : 3.147.53.90


Current Path : /proc/thread-self/root/opt/alt/python311/lib64/python3.11/json/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python311/lib64/python3.11/json/__pycache__/decoder.cpython-311.pyc

�

c��f�0�	��dZddlZddlmZ	ddlmZn
#e$rdZYnwxYwddgZej	ej
zejzZe
d��Ze
d��Ze
d	��ZGd
�de��Zeeed�Zejde��Zd
dddddddd�Zd�Zdeejfd�ZepeZejde��ZdZdejefd�Zejefd�ZGd�de��ZdS)zImplementation of JSONDecoder
�N)�scanner)�
scanstring�JSONDecoder�JSONDecodeError�nan�infz-infc��eZdZdZd�Zd�ZdS)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��|�dd|��dz}||�dd|��z
}d||||fz}t�||��||_||_||_||_||_dS)N�
r�z%s: line %d column %d (char %d))	�count�rfind�
ValueError�__init__�msg�doc�pos�lineno�colno)�selfrrrrr�errmsgs       �3/opt/alt/python311/lib64/python3.11/json/decoder.pyrzJSONDecodeError.__init__s������4��C�(�(�1�,���c�i�i��a��-�-�-��2�c�6�5�#�5N�N�����D�&�)�)�)���������������
�
�
�c�8�|j|j|j|jffS)N)�	__class__rrr)rs r�
__reduce__zJSONDecodeError.__reduce__*s���~���$�(�D�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|��dkr+|ddvr!	t|d��S#t$rYnwxYwd}t|||���)Nr���xX�zInvalid \uXXXX escape)�len�intrr)�sr�escrs    r�
_decode_uXXXXr9;s��
�C�!�G�C�!�G�O�
�C�
�3�x�x�1�}�}��Q��t�+�+�	��s�B�<�<����	�	�	��D�	����
"�C�
�#�q�#�
&�
&�&s�?�
A�ATc�~�g}|j}|dz
}	|||��}|�td||���|���}|���\}	}
|	r||	��|
dkr�n9|
dkr4|r&d�|
��}t|||���||
����	||}n #t
$rtd||��d�wxYw|dkrD	||}
n4#t$r'd�|��}t|||���wxYw|dz
}n~t||��}|d	z
}d
|cxkrdkrMnnJ|||dz�d
kr9t||dz��}d|cxkrdkrnnd|d
z
dz|dz
zz}|dz
}t|��}
||
�����d�	|��|fS)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_scanstringrTEsg���F��m�G��!�G�E�+���1�c�
�
���=�!�"C�Q��N�N�N��i�i�k�k��#�l�l�n�n�����	��G�G���������
�4�
�
��
�:�A�A�*�M�M��%�c�1�c�2�2�2���
�#�#�#��	6��C�&�C�C���	6�	6�	6�!�"C�"#�U�,�,�15�
6�	6�����#�:�:�
3��#�w�����
3�
3�
3�/�6�6�s�;�;��%�c�1�c�2�2�2�
3����
�1�H�C�C���3�'�'�C��1�H�C���&�&�&�&��&�&�&�&�&�1�S��q��[�>�U�+B�+B�$�Q��a��0�0���T�+�+�+�+�V�+�+�+�+�+�!�s�V�|��&:�t�f�}�%M�N�C��1�H�C��s�8�8�D����
�
�
�W+�X�7�7�6�?�?�C��s�*B3�3C�C#�#1Dz
[ \t\n\r]*z 	

c�<�|\}}	g}
|
j}|�i}|j}||	|	dz�}
|
dkrv|
|vr+|||	�����}	||	|	dz�}
|
dkr*|�||
��}||	dzfSi}
|�||
��}
|
|	dzfS|
dkrtd||	���|	dz
}		t	||	|��\}}	|||��}||	|	dz�dkr@|||	�����}	||	|	dz�dkrtd||	���|	dz
}		||	|vr0|	dz
}	||	|vr!|||	dz�����}	n#t
$rYnwxYw	|||	��\}}	n)#t$r}td||j��d�d}~wwxYw|||f��	||	}
|
|vr)|||	dz�����}	||	}
n#t
$rd	}
YnwxYw|	dz
}	|
dkrnf|
d
krtd||	dz
���|||	�����}	||	|	dz�}
|	dz
}	|
dkrtd||	dz
������|�||
��}||	fSt|
��}
|�||
��}
|
|	fS)Nrr$�}z1Expecting property name enclosed in double quotesT�: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�1���s�Q�w��&��E��&�#��E�*�*���#��'�>�!�
��_�_�!�C�Q��M�M�
M��1�H�C�*Q��a��f�-�-���S��h�s�C� � ��
�S��q��[�>�S� � ��"�Q��*�*�.�.�"�"�C���S�1�W��~��$�$�%�&?��C�H�H�H��q���	���v��}�}��q����S�6�S�=�=��"�Q��a��.�.�,�,�.�.�C����	�	�	��D�	����	M�"��1�c�*�*�J�E�3�3���	M�	M�	M�!�"3�Q��	�B�B��L�����	M������c�5�\�"�"�"�	���v�H��3����b��C�!�G�n�n�(�(�*�*���S�6�����	�	�	��H�H�H�	�����q����s�?�?��
��_�_�!�";�Q��a��H�H�H��b��C�j�j�n�n�����S��q��[�>���q����s�?�?�!�C�Q��a��Q�Q�
Q�S*Q�V�$�"�"�5�)�)���s�{����K�K�E�����E�"�"���#�:�s<� :E�
E(�'E(�,E<�<
F"�F�F"�35G)�)G8�7G8c��|\}}g}|||dz�}||vr.|||dz�����}|||dz�}|dkr||dzfS|j}		|||��\}	}n)#t$r}
td||
j��d�d}
~
wwxYw||	��|||dz�}||vr.|||dz�����}|||dz�}|dz
}|dkrng|dkrtd||dz
���	|||vr0|dz
}|||vr!|||dz�����}n#t
$rYnwxYw��||fS)Nr�]TrXrYrZ)rAr@r\rr]rD)r_r`rdrer7rA�valuesrirLr]rls           r�	JSONArrayrq�s���
�F�A�s�
�F���S�1�W��~�H��3����b��C�!�G�n�n� � �"�"���S��q��[�>���3����s�Q�w����m�G��	M�"��1�c�*�*�J�E�3�3���	M�	M�	M�!�"3�Q��	�B�B��L�����	M�����������S��q��[�>���s�?�?��"�Q��a��.�.�$�$�&�&�C���S�1�W��~�H��q����s�?�?��
��_�_�!�";�Q��a��H�H�H�	���v��}�}��q����S�6�S�=�=��"�Q��a��.�.�,�,�.�.�C����	�	�	��D�	����)�.�3�;�s*�A-�-
B�7B�B�:E�
E�Ec�D�eZdZdZddddddd�d�Zejfd�Zd	d�ZdS)
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��||_|pt|_|pt|_|pt
j|_||_||_	t|_t|_
t|_i|_t#j|��|_dS)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__sz��F'���&�/�%���"�)�c���,�F�
�0F������!2���&���$���&�����	� �-�d�3�3����rc��|�|||d��������\}}|||�����}|t|��krtd||���|S)zlReturn the Python representation of ``s`` (a ``str`` instance
        containing a JSON document).

        r)�idxz
Extra data)�
raw_decoderAr5r)rr7rd�objrAs     r�decodezJSONDecoder.decodeLsn��
�?�?�1�"�"�Q��(�(�,�,�.�.�?�9�9���S��b��C�j�j�n�n�����#�a�&�&�=�=�!�,��3�7�7�7��
rrc��	|�||��\}}n)#t$r}td||j��d�d}~wwxYw||fS)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_decodeWsd��	M��~�~�a��-�-�H�C�����	M�	M�	M�!�"3�Q��	�B�B��L�����	M�����C�x�s��
A�=�A)r)	rrrr r�
WHITESPACE�matchr�r�r!rrrr�sy��������:'+���4��"�-4�-4�-4�-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�s�����	�	�	�	��������0�0�0�0�0�0�0�������L�L�L������+�
,��
�
�R�\�!�B�I�-���e�E�l�l��	��u����	��v����>�>�>�>�>�j�>�>�>�6�����
��b�j�1�5�9�9��	�D�s�	
�D�t�$�T�
�
�	�
'�'�'�"&���*�9 �9 �9 �9 �z�
*�]�
�
�R�Z�
�u�
-�
-�
����Z�-�>�O�O�O�O�b(2�'7�^�"�"�"�"�Jf�f�f�f�f�&�f�f�f�f�fs���