Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/simplejson/__pycache__/decoder.cpython-311.pyc



]j<	dZddlmZddlZddlZddlmZmZddlm	Z	m
Z
dZeZdgZ
ejejzejzZd	Ze\ZZZeeed
ZejdeZdd
dddddddZdZeedreZnd#dZejdjfdZddeejdj eej!efdZ"epe"Z#ejdeZ$dZ%de$je%fd Z&de$je%fd!Z'Gd"de(Z)dS)$zImplementation of JSONDecoder
)absolute_importN)PY3unichr)make_scannerJSONDecodeErrorc6	ddlm}|S#t$rYdSwxYw)Nr
scanstring)	_speedupsrImportErrorr
s t/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib64/python3.11/site-packages/simplejson/decoder.py_import_c_scanstringr
sA))))))tts

JSONDecodercZtdtdtdfS)Nnaninfz-inf)floatr_floatconstantsrs!<<uuV}}44r)z	-InfinityInfinityNaNz(.*?)(["\\\x00-\x1f])"\/

	)rrrbfnrtzutf-8get_int_max_str_digitsct||kr#td|dt|dt|S)zBackport of the integer string length conversion limitation

        https://docs.python.org/3/library/stdtypes.html#int-max-str-digits
        zExceeds the limit (z+) for integer string conversion: value has z digits)len
ValueErrorint)sINT_MAX_STR_DIGITSs  rbounded_intr/.sq
q66&&&*l~l~l~ADEFAGAGAGAGHII
I1vv
rz^[0-9a-fA-F]{4}$cd}|||dz}||st|||dz
	t|d|dzfS#t$rt|||dz
wxYw)z5Scan a four digit hex number from s[end:end + 4]
    zInvalid \uXXXX escape sequence)rr,r+)r-end_mmsgescs     rscan_four_digit_hexr88s,C
CaK.C
2c77/c1cAg.../3||S1W$$///c1cAg.../sAA$Tc
b|t}g}
|
j}|dz
}	|||}
|
td|||}|
}|
\}}|r2|s%t|tst
||}|||dkrn|dkr!|rd}t|||||	||}n#t$rtd||wxYw|dkr1	||}n!#t$rd}t|||wxYw|dz
}no|	||dz\}}|d	krH|d
zdkr?|||dzd
kr.|	||dz\}}|d
zdkrd|dz
dz|dz
zz}|}t|}||||
|fS)aScan 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.NrzUnterminated string starting atrrzInvalid control character %r atuzInvalid \X escape sequence %riiir2z\uii
)
DEFAULT_ENCODINGappendrr4groups
isinstanceunicode
IndexErrorKeyErrorr)r-r4encodingstrict_br5_join_PY3_maxunicode_scan_four_digit_hexchunks_appendbeginchunkprev_endcontent
terminatorr6r7charuniuni2end2s                       r
py_scanstringrVDsw#
FmG!GE51c

=!11e==
=iikk#llnn	
5
7G < <
5!'844GG
4


7%c1h777
###	=C&CC	=	=	=!11e==
=	=#::
3#w
3
3
36%c1c222
3
1HCC,+AsQw77HCe##f&&#cAg+%''11!S1W==
d&=F**!sV|&:)-&89CC#;;D


k5l5==#s	CC.8DDz
[ \t\n\r]*z 	

c	|\}	}
|i}|j}g}|	|
|
dz}
|
dkrv|
|vr+||	|
}
|	|
|
dz}
|
dkr*|||}||
dzfSi}|||}||
dzfS|
dkrtd|	|
|
dz
}
	t|	|
||\}}
|||}|	|
|
dzdkr@||	|
}
|	|
|
dzdkrtd|	|
|
dz
}
	|	|
|vr0|
dz
}
|	|
|vr!||	|
dz}
n#t$rYnwxYw||	|
\}}
|||f	|	|
}
|
|vr)||	|
dz}
|	|
}
n#t$rd}
YnwxYw|
dz
}
|
dkrn|
d	krtd
|	|
dz
	|	|
}
|
|vr:|
dz
}
|	|
}
|
|vr)||	|
dz}
|	|
}
n#t$rd}
YnwxYw|
dz
}
|
dkr.|
dkrtd|	|
dz
td|	|
dz
|||}||
fSt
|}|||}||
fS)
Nrr}z8Expecting property name enclosed in double quotes or '}'T:zExpecting ':' delimiterr9,zExpecting ',' delimiter or '}'z+Illegal trailing comma before end of objectz1Expecting property name enclosed in double quotes)
setdefaultr4rrrBr>dict)staterDrE	scan_onceobject_hookobject_pairs_hookmemo_w_wsr-r4memo_getpairsnextcharresultkeyvalues                 r
JSONObjectrjsHQ|HES1W~H3s??"Q**..""CS1W~Hs?? ,**511sQw&E&#E**#'>!
__!J3
1HC9ah77ShsC  
Sq[>S  "Q**..""CS1W~$$%&?CHHHq	v}}qS6S=="Qa..,,..C			D	Yq#&&
s
c5\"""	vH3bC!Gnn((**S6			HHH	qs??
__!"BAsQwOOO		vH3qS6s??"Qa..,,..C vH			HHH		qs??3%AsQw   "C37
o9v$""5))s{KKEE""#:s7:E
E"!E"5GGG;AIIIc|\}}g}|||dz}||vr.|||dz}|||dz}|dkr|||}||dzfS|dkrtd|||j}		|||\}
}|	|
|||dz}||vr.|||dz}|||dz}|dz
}|dkrn|dkrtd||dz
	|||vr0|dz
}|||vr!|||dz}n#t$rYnwxYw|||dzdkrtd||dz
|||}||fS)	Nr]r9zExpecting value or ']'TrZzExpecting ',' delimiter or ']'z*Illegal trailing comma before end of array)r4rr>rB)r]r^
array_hookrbrcr-r4valuesrfrLris           r	JSONArrayrosHQ
FS1W~H3bC!Gnn  ""Sq[>3!Z''FsQw	R63???mGYq#&&
sSq[>s??"Qa..$$&&CS1W~Hqs??
__!"BAsQwOOO	v}}qS6S=="Qa..,,..C			D	
Sq[>S  !<37
-4F##3;s:D;;
EEcPeZdZdZ				d	dZejefdZdejefdZ	dS)
ra3Simple JSON <http://json.org> decoder

    Performs the following translations in decoding by default:

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

    When allow_nan=True, it also understands
    ``NaN``, ``Infinity``, and ``-Infinity`` as
    their corresponding ``float`` values, which is outside the JSON spec.

    NTFc
B|t}||_||_||_|pt|_|pt|_|p|rtj	pd|_
||_|	|_t|_t|_t"|_i|_t)||_dS)a	
        *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`.

        *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 :class:`dict`.  This can be used to provide custom
        deserializations (e.g. to support JSON-RPC class hinting).

        *object_pairs_hook* is an optional function that will be called with
        the result of any object literal decode with an ordered list of pairs.
        The return value of *object_pairs_hook* will be used instead of the
        :class:`dict`.  This feature can be used to implement custom decoders
        that rely on the order that the key and value pairs are decoded (for
        example, :func:`collections.OrderedDict` will remember the order of
        insertion). 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. :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 datatype or parser
        for JSON integers (e.g. :class:`float`).

        *allow_nan*, if True (default false), will allow the parser to
        accept the non-standard floats ``NaN``, ``Infinity``, and ``-Infinity``.

        *parse_constant*, if specified, will be
        called with one of the following strings: ``'-Infinity'``,
        ``'Infinity'``, ``'NaN'``. It is not recommended to use this feature,
        as it is rare to parse non-compliant JSON containing these values.

        *strict* controls the parser's behavior when it encounters an
        invalid control character in a string. The default setting of
        ``True`` means that unescaped control characters are parse errors, if
        ``False`` then control characters will be allowed in strings.

        N)r=rDr_r`rparse_floatr/	parse_int
_CONSTANTS__getitem__parse_constantrErmrjparse_objectroparse_arrayrparse_stringrarr^)
selfrDr_rrrsrvrEr`	allow_nanrms
          r__init__zJSONDecoder.__init__Csd'H 
&!2&/%"1k,^1Uz?U1]Y]$&$&	%d++rc.|r*t|trt||j}||\}}|||}|t
|krtd||t
||S)zzReturn the Python representation of ``s`` (a ``str`` or ``unicode``
        instance containing a JSON document)

        z
Extra data)r@bytesstrrD
raw_decoder4r*r)rzr-rbrHobjr4s      rdecodezJSONDecoder.decodes
	&Jq%((	&At}%%A??1%%SbCjjnn#a&&==!,3A???
rrc|dkrtd|||r$t|tstdt	||kr=t||}|dkr|dz
}n|dkr|||dzdkr|dz
}|||||	S)
aDecode a JSON document from ``s`` (a ``str`` or ``unicode``
        beginning with a JSON document) and return a 2-tuple of the Python
        representation and the index in ``s`` where the document ended.
        Optionally, ``idx`` can be used to specify an offset in ``s`` where
        the JSON document begins.

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

        rzExpecting valuez$Input string must be text, not bytesiru)idx)rr@r	TypeErrorr*ordr^r4)rzr-rrbrHord0s      rrzJSONDecoder.raw_decodes77""3Q<<<	D
1c**	DBCCCq66C<<qv;;Dv~~q!CaK.N"B"Bq~~aRR3ZZ^^%5%5~666r)	NNNNNTNFN)
__name__
__module____qualname____doc__r|
WHITESPACEmatchrrrrrrrr$s<EI8<.3@,@,@,@,D&+#!"j&6S777777r)r()*r
__future__rresyscompatrrscannerrrrc_scanstring__all__VERBOSE	MULTILINEDOTALLFLAGSrrPosInfNegInfrtcompileSTRINGCHUNK	BACKSLASHr=hasattrr,r/rr8join
maxunicoderVrrWHITESPACE_STRrjroobjectrrrr<module>rsQ&&&&&&				



22222222$#%%/

R\!BI-555&o''VV
bj1599	
U	UU

	

73())
KK$.2:.A#B#B#H
/
/
/
/$(*#(
cn0GGGGV
*]

RZ
u
-
-
!%````D,0!~,,,,\F7F7F7F7F7&F7F7F7F7F7r
Back to Directory File Manager