Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/simplejson/__pycache__/encoder.cpython-311.pyc
]jw ( d Z ddlmZ ddlZddlmZ ddlZddlZddlm Z m
Z
mZmZm
Z
ej dk Zd Z e \ ZZZdd lmZ dd
lmZ ej d Z ej d Z ej d
ZddddddddZ ed D ]%Ze e e defz &[e!Z"ej dk re#e$fZ%ne#Z%e
dfdZ&e
fdZ'epe'Z(epe&Z) G d de* Z+ G d de+ Z,e
e-ede#e%e.e/ee0e1e2e3e4fd Z5dS )!zImplementation of JSONEncoder
)absolute_importN)
itemgetter )binary_type text_typestring_types
integer_typesPY3) c Z ddl m} | j | j | j fS # t
$ r Y dS w xY w)Nr _speedups)NNN) r encode_basestring_asciiencode_basestringmake_encoderImportErrorr s t/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib64/python3.11/site-packages/simplejson/encoder.py_import_speedupsr s[ 1+&( ( s
**)PosInf)RawJSONz[\x00-\x1f\\"]z([\\"]|[^\ -~])z[\x80-\xff]z\\z\"z\bz\fz\nz\rz\t)\"
\u%04x)r r c V |rWt | t rt | d } nt | t urt | } nt | t r+t
| t | d } nmt | t t fvrPt | t rt | } n t | d } d }|t
|| z |z S )z5Return a JSON representation of a Python string
utf-8Nr c B t | d S )Nr )
ESCAPE_DCTgroup)matchs r replacez%py_encode_basestring.<locals>.replaceK s %++a..)) )
isinstancebytesstrtype__str__HAS_UTF8searchunicode__getnewargs__ESCAPEsub)s_PY3_qr) s r py_encode_basestringr9 5 s 1a AwAA
!WWC
AAa 1(//!"4"4"@7##AA
!WWS'N
*
* !S!!
1KKNN**1--a0* * *
7A&&&++r* c p |rWt | t rt | d } nt | t urt | } nt | t r+t
| t | d } nmt | t t fvrPt | t rt | } n t | d } d }dt t
|| z dz S )zAReturn an ASCII-only JSON representation of a Python string
r$ Nr c | d } t | S # t $ r? t | }|dk rd|fz cY S |dz }d|dz dz z }d|dz z }d||fz cY S w xY w) Nr i r! i
i i z\u%04x\u%04x)r' r&