/usr/lib64/python3.9/json/__pycache__
NameSizeModeActions
decoder.cpython-39.opt-1.pyc98080644editdlrm
decoder.cpython-39.opt-2.pyc58190644editdlrm
decoder.cpython-39.pyc98080644editdlrm
encoder.cpython-39.opt-1.pyc111320644editdlrm
encoder.cpython-39.opt-2.pyc67780644editdlrm
encoder.cpython-39.pyc111320644editdlrm
scanner.cpython-39.opt-1.pyc19530644editdlrm
scanner.cpython-39.opt-2.pyc19170644editdlrm
scanner.cpython-39.pyc19530644editdlrm
tool.cpython-39.opt-1.pyc28090644editdlrm
tool.cpython-39.opt-2.pyc25160644editdlrm
tool.cpython-39.pyc28090644editdlrm
__init__.cpython-39.opt-1.pyc122950644editdlrm
__init__.cpython-39.opt-2.pyc29910644editdlrm
__init__.cpython-39.pyc122950644editdlrm
Edit: /usr/lib64/python3.9/json/__pycache__/encoder.cpython-39.opt-1.pyc (11132B)
a ´iÉ>ã @s8dZddlZzddlmZWney2dZYn0zddlmZWneyZdZYn0zddlmZ Wney‚dZ Yn0e  d¡Z e  d¡Z e  d¡Z d d d d d dddœZedƒD]Ze eeƒd e¡¡q¾edƒZdd„ZepðeZdd„Ze�peZGdd„deƒZeeeeeeee e!ej"f dd„Z#dS)zImplementation of JSONEncoder éN)Úencode_basestring_ascii)Úencode_basestring)Ú make_encoderz[\x00-\x1f\\"\b\f\n\r\t]z([\\"]|[^\ -~])s[€-ÿ]z\\z\"z\bz\fz\nz\rz\t)ú\ú"úú Ú ú ú é ú \u{0:04x}ÚinfcCsdd„}dt ||¡dS)z5Return a JSON representation of a Python string cSst| d¡S)Nr)Ú ESCAPE_DCTÚgroup)Úmatch©rú$/usr/lib64/python3.9/json/encoder.pyÚreplace(sz%py_encode_basestring..replacer)ÚESCAPEÚsub©ÚsrrrrÚpy_encode_basestring$srcCsdd„}dt ||¡dS)zAReturn an ASCII-only JSON representation of a Python string cSs~| d¡}z t|WStyxt|ƒ}|dkr@d |¡YS|d8}d|d?d@B}d|d@B}d ||¡YSYn0dS) Nrir iØé iÿiÜz\u{0:04x}\u{1:04x})rrÚKeyErrorÚordÚformat)rrÚnÚs1Ús2rrrr4s    z+py_encode_basestring_ascii..replacer)Ú ESCAPE_ASCIIrrrrrÚpy_encode_basestring_ascii0sr"c @sNeZdZdZdZdZdddddddddœdd „Zd d „Zd d „Zddd„Z dS)Ú JSONEncoderaZExtensible JSON encoder for Python data structures. Supports the following objects and types by default: +-------------------+---------------+ | Python | JSON | +===================+===============+ | dict | object | +-------------------+---------------+ | list, tuple | array | +-------------------+---------------+ | str | string | +-------------------+---------------+ | int, float | number | +-------------------+---------------+ | True | true | +-------------------+---------------+ | False | false | +-------------------+---------------+ | None | null | +-------------------+---------------+ To extend this to recognize other objects, subclass and implement a ``.default()`` method with another method that returns a serializable object for ``o`` if possible, otherwise it should call the superclass implementation (to raise ``TypeError``). z, z: FTN)ÚskipkeysÚ ensure_asciiÚcheck_circularÚ allow_nanÚ sort_keysÚindentÚ separatorsÚdefaultc CsZ||_||_||_||_||_||_|dur:|\|_|_n|durHd|_|durV||_dS)aÇConstructor for JSONEncoder, with sensible defaults. If skipkeys is false, then it is a TypeError to attempt encoding of keys that are not str, int, float or None. If skipkeys is True, such items are simply skipped. If ensure_ascii is true, the output is guaranteed to be str objects with all incoming non-ASCII characters escaped. If ensure_ascii is false, the output can contain non-ASCII characters. If check_circular is true, then lists, dicts, and custom encoded objects will be checked for circular references during encoding to prevent an infinite recursion (which would cause an RecursionError). Otherwise, no such check takes place. If allow_nan is true, then NaN, Infinity, and -Infinity will be encoded as such. This behavior is not JSON specification compliant, but is consistent with most JavaScript based encoders and decoders. Otherwise, it will be a ValueError to encode such floats. If sort_keys is true, then the output of dictionaries will be sorted by key; this is useful for regression tests to ensure that JSON serializations can be compared on a day-to-day basis. If indent is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines. None is the most compact representation. If specified, separators should be an (item_separator, key_separator) tuple. The default is (', ', ': ') if *indent* is ``None`` and (',', ': ') otherwise. To get the most compact JSON representation, you should specify (',', ':') to eliminate whitespace. If specified, default is a function that gets called for objects that can't otherwise be serialized. It should return a JSON encodable version of the object or raise a ``TypeError``. Nú,) r$r%r&r'r(r)Úitem_separatorÚ key_separatorr+) Úselfr$r%r&r'r(r)r*r+rrrÚ__init__hs+zJSONEncoder.__init__cCstd|jj›d�ƒ‚dS)alImplement this method in a subclass such that it returns a serializable object for ``o``, or calls the base implementation (to raise a ``TypeError``). For example, to support arbitrary iterators, you could implement default like this:: def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) # Let the base class default method raise the TypeError return JSONEncoder.default(self, o) zObject of type z is not JSON serializableN)Ú TypeErrorÚ __class__Ú__name__)r/Úorrrr+ szJSONEncoder.defaultcCsNt|tƒr |jrt|ƒSt|ƒS|j|dd�}t|ttfƒsDt|ƒ}d |¡S)z×Return a JSON string representation of a Python data structure. >>> from json.encoder import JSONEncoder >>> JSONEncoder().encode({"foo": ["bar", "baz"]}) '{"foo": ["bar", "baz"]}' T)Ú _one_shotÚ) Ú isinstanceÚstrr%rrÚ iterencodeÚlistÚtupleÚjoin)r/r4ÚchunksrrrÚencode¶s zJSONEncoder.encodec Cs¦|jr i}nd}|jrt}nt}|jtjtt fdd„}|rvtdurv|j durvt||j ||j |j |j |j |j|jƒ }n&t||j ||j ||j |j |j |j|ƒ }||dƒS)zØEncode the given object and yield each string representation as available. For example:: for chunk in JSONEncoder().iterencode(bigobject): mysocket.write(chunk) NcSsJ||krd}n$||krd}n||kr*d}n||ƒS|sFtdt|ƒƒ‚|S)NZNaNZInfinityz -Infinityz2Out of range float values are not JSON compliant: )Ú ValueErrorÚrepr)r4r'Z_reprZ_infZ_neginfÚtextrrrÚfloatstrßsÿÿz(JSONEncoder.iterencode..floatstrr)r&r%rrr'ÚfloatÚ__repr__ÚINFINITYÚc_make_encoderr)r+r.r-r(r$Ú_make_iterencode)r/r4r5ÚmarkersÚ_encoderrBÚ _iterencoderrrr9Ìs.  ÿ  ÿ  ý ýzJSONEncoder.iterencode)F) r3Ú __module__Ú __qualname__Ú__doc__r-r.r0r+r>r9rrrrr#Isþ 8r#cs¬ˆdurˆˆˆƒsdˆ‰‡‡‡‡‡‡‡‡‡ ‡ ‡‡‡‡‡‡‡‡fdd„‰ ‡‡‡‡‡‡‡‡‡ ‡ ‡ ‡ ‡ ‡‡‡‡‡‡‡‡fdd„‰‡‡‡‡‡‡‡‡ ‡ ‡‡‡‡‡‡‡‡fdd„‰ˆS)Nú c 3s |sdVdSˆdur6ˆ |ƒ}|ˆvr.ˆdƒ‚|ˆ|<d}ˆdurh|d7}dˆ|}ˆ|}||7}nd}ˆ}d}|D]ì}|r†d}n|}ˆ |ˆƒr¤|ˆ|ƒVqx|dur¸|dVqx|durÌ|d Vqx|durà|d Vqxˆ |ˆ ƒrú|ˆ|ƒVqxˆ |ˆ ƒ�r|ˆ|ƒVqx|Vˆ |ˆˆfƒ�r8ˆ||ƒ}n"ˆ |ˆ ƒ�rPˆ||ƒ}n ˆ||ƒ}|EdHqx|du�r†|d8}dˆ|Vd Vˆdu�rœˆ|=dS) Nz[]úCircular reference detectedú[ér TFÚnullÚtrueÚfalseú]r) ZlstÚ_current_indent_levelÚmarkeridÚbufÚnewline_indentÚ separatorÚfirstÚvaluer=)r?rIÚ _floatstrÚ_indentÚ_intstrÚ_item_separatorrJÚ_iterencode_dictÚ_iterencode_listÚdictrCÚidÚintr7r:rHr8r;rrrbs\               z*_make_iterencode.._iterencode_listc 3s:|sdVdSˆdur6ˆ|ƒ}|ˆvr.ˆdƒ‚|ˆ|<dVˆdurh|d7}dˆ|}ˆ|}|Vnd}ˆ}d}ˆ r†t| ¡ƒ}n| ¡}|D�]j\}}ˆ|ˆƒr¨nnˆ|ˆ ƒr¼ˆ|ƒ}nZ|durÊd}nL|durØd }n>|duræd }n0ˆ|ˆƒrúˆ|ƒ}nˆ �rq’ntd |jj›�ƒ‚|�r"d}n|Vˆ|ƒVˆ Vˆ|ˆƒ�rPˆ|ƒVq’|du�rbd Vq’|du�rtdVq’|du�r†d Vq’ˆ|ˆƒ�ržˆ|ƒVq’ˆ|ˆ ƒ�r¶ˆ|ƒVq’ˆ|ˆˆfƒ�rÒˆ||ƒ} n"ˆ|ˆ ƒ�rêˆ||ƒ} n ˆ||ƒ} | EdHq’|du�r |d8}dˆ|Vd Vˆdu�r6ˆ|=dS) Nz{}rOú{rQr TrSFrTrRz0keys must be str, int, float, bool or None, not ú})ÚsortedÚitemsr1r2r3) ZdctrVrWrYr-r[riÚkeyr\r=)r?rIr]r^r_r`rJrarbÚ_key_separatorÚ _skipkeysÚ _sort_keysrcrCrdrer7r:rHr8r;rrraMs†      ÿ                 z*_make_iterencode.._iterencode_dictc3sˆ |ˆƒrˆ|ƒVnæ|dur&dVnÖ|dur6dVnÆ|durFdVn¶ˆ |ˆ ƒr\ˆ|ƒVn ˆ |ˆ ƒrrˆ|ƒVnŠˆ |ˆ ˆfƒr’ˆ||ƒEdHnjˆ |ˆƒr®ˆ||ƒEdHnNˆdurÖˆ |ƒ}|ˆvrΈdƒ‚|ˆ|<ˆ|ƒ}ˆ||ƒEdHˆdurüˆ|=dS)NrRTrSFrTrOr)r4rVrW)r?Ú_defaultrIr]r_rJrarbrcrCrdrer7r:rHr8r;rrrJ�s2       z%_make_iterencode.._iterencoder)rHrnrIr^r]rkr`rmrlr5r?rcrCrdrer7r:r8r;r_r)r?rnrIr]r^r_r`rJrarbrkrlrmrcrCrdrer7r:rHr8r;rrGs .84P,rG)$rMÚreZ_jsonrZc_encode_basestring_asciiÚ ImportErrorrZc_encode_basestringrrFÚcompilerr!ZHAS_UTF8rÚrangeÚiÚ setdefaultÚchrrrCrErr"Úobjectr#r?rcrdrer7r:r8r;rDrGrrrrÚsZ         ù  ÿ>ô