KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : andertr9 ( 1047)
PHP Version : 8.2.18
Disable Function : NONE
Directory :  /proc/self/root/usr/lib64/python3.6/json/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib64/python3.6/json/__pycache__/tool.cpython-36.pyc
3


 \m�@s>dZddlZddlZddlZddlZdd�Zedkr:e�dS)aCommand-line tool to validate and pretty-print JSON

Usage::

    $ echo '{"json":"obj"}' | python -m json.tool
    {
        "json": "obj"
    }
    $ echo '{ 1.2:3.4}' | python -m json.tool
    Expecting property name enclosed in double quotes: line 1 column 3 (char 2)

�Nc	"Csd}d}tj||d�}|jddtj�dd�|jddtjd	�d
d�|jddd
dd�|j�}|jphtj}|jpttj	}|j
}|�Vy$|r�tj|�}ntj|t
jd�}Wn*tk
r�}zt|��WYdd}~XnXWdQRX|�"tj|||dd�|jd�WdQRXdS)Nzpython -m json.toolzZA simple command line interface for json module to validate and pretty-print JSON objects.)�prog�description�infile�?z-a JSON file to be validated or pretty-printed)�nargs�type�help�outfile�wz%write the output of infile to outfilez--sort-keys�
store_trueFz5sort the output of dictionaries alphabetically by key)�action�defaultr)Zobject_pairs_hook�)�	sort_keys�indent�
)�argparse�ArgumentParser�add_argumentZFileType�
parse_argsr�sys�stdinr	�stdoutr�json�load�collections�OrderedDict�
ValueError�
SystemExit�dump�write)	rr�parserZoptionsrr	r�obj�e�r$�/usr/lib64/python3.6/tool.py�mains0
$r&�__main__)�__doc__rrrrr&�__name__r$r$r$r%�<module>s

Anon7 - 2021