Your IP : 3.145.85.233


Current Path : /lib64/python3.8/json/__pycache__/
Upload File :
Current File : //lib64/python3.8/json/__pycache__/tool.cpython-38.opt-2.pyc

U

e5d��
@sfddlZddlZddlZdd�Zedkrbz
e�Wn.ek
r`Zze�ej�W5dZ[XYnXdS)�NcCs4d}d}tj||d�}|jddtjdd�dtjd	�|jd
dtjddd�dtjd	�|jd
dddd�|jddddd�|��}|j}|j	}|j
}|j}|��|�~zJ|r�dd�|D�}nt�
|�f}|D] }	tj|	||dd�|�d�q�Wn,tk
�r}
zt|
��W5d}
~
XYnXW5QRXW5QRXdS)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--json-linesz&parse input using the jsonlines formatcss|]}t�|�VqdS)N)�json�loads)�.0�line�r�!/usr/lib64/python3.8/json/tool.py�	<genexpr>,szmain.<locals>.<genexpr>�)�	sort_keys�indent�
)�argparse�ArgumentParser�add_argumentZFileType�sys�stdin�stdout�
parse_argsrrr�
json_linesr�load�dump�write�
ValueError�
SystemExit)rr�parserZoptionsrrrr!Zobjs�obj�errr�mainsD
��
�
�r*�__main__)	rrrr*�__name__�BrokenPipeError�exc�exit�errnorrrr�<module>
s$


?>