HEX
Server: Apache/2.4.65 (Unix) OpenSSL/1.1.1k
System: Linux vps109042.inmotionhosting.com 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: cisa (1010)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //opt/imh-python/lib/python3.9/json/__pycache__/tool.cpython-39.opt-2.pyc
a

c�hn�
@shddlZddlZddlZdd�Zedkrdz
e�Wn0eybZze�ej�WYdZ[n
dZ[00dS)�NcCs�d}d}tj||d�}|jddtjdd�dtjd	�|jd
dtjddd�dtjd	�|jd
dddd�|jddddd�|jddddd�|��}|jddtdd�|jdddd d!d"�|jd#dddd$d"�|jd%dd&d'�|�	�}|j
|j|jd(�}|j
�rd|d<d)|d*<|j��}|j��}zR|j�r8d+d,�|D�}nt�|�f}|D]$}	tj|	|fi|��|�d-��qHWn.t�y�}
zt|
��WYd}
~
n
d}
~
00Wd�n1�s�0YWd�n1�s�0YdS).Nzpython -m json.toolzZA simple command line interface for json module to validate and pretty-print JSON objects.)�prog�description�infile�?zutf-8)�encodingz-a JSON file to be validated or pretty-printed)�nargs�type�help�default�outfile�wz%write the output of infile to outfilez--sort-keys�
store_trueFz5sort the output of dictionaries alphabetically by key)�actionr
r	z--no-ensure-ascii�ensure_ascii�store_falsez(disable escaping of non-ASCII characters)�destrr	z--json-linesznparse input using the JSON Lines format. Use with --no-indent or --compact to produce valid JSON Lines output.z--indent�zJseparate items with newlines and use this number of spaces for indentation)r
rr	z--tab�store_const�indent�	z9separate items with newlines and use tabs for indentation)rr�constr	z--no-indentz/separate items with spaces rather than newlinesz	--compactz1suppress all whitespace separation (most compact))rr	)�	sort_keysrr)�,�:Z
separatorscss|]}t�|�VqdS)N)�json�loads)�.0�line�r�*/opt/imh-python/lib/python3.9/json/tool.py�	<genexpr>@�zmain.<locals>.<genexpr>�
)�argparse�ArgumentParser�add_argument�FileType�sys�stdin�stdout�add_mutually_exclusive_group�int�
parse_argsrrrZcompactrrZ
json_linesr�load�dump�write�
ValueError�
SystemExit)rr�parser�group�optionsZ	dump_argsrrZobjs�obj�errr�mainsl
��
�
�
�
�
�
���r7�__main__)	r#rr'r7�__name__�BrokenPipeError�exc�exit�errnorrrr�<module>
s8