Your IP : 3.146.178.220


Current Path : /opt/alt/python35/lib64/python3.5/json/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/json/__pycache__/tool.cpython-35.opt-2.pyc



���]m�@sSddlZddlZddlZddlZdd�ZedkrOe�dS)�Nc	#Cszd}d}tjd|d|�}|jddddtj�d	d
�|jddddtjd�d	d
�|jdddddd	d�|j�}|jp�tj}|jp�tj	}|j
}|�my4|r�tj|�}ntj|dt
j�}Wn1tk
r7}zt|��WYdd}~XnXWdQRX|�.tj||d|dd�|jd�WdQRXdS)Nzpython -m json.toolzZA simple command line interface for json module to validate and pretty-print JSON objects.�prog�description�infile�nargs�?�type�helpz-a JSON file to be validated or pretty-printed�outfile�wz%write the output of infile to outfilez--sort-keys�action�
store_true�defaultFz5sort the output of dictionaries alphabetically by keyZobject_pairs_hook�	sort_keys�indent��
)�argparse�ArgumentParser�add_argument�FileType�
parse_argsr�sys�stdinr	�stdoutr�json�load�collections�OrderedDict�
ValueError�
SystemExit�dump�write)	rr�parser�optionsrr	r�obj�e�r&�)/opt/alt/python35/lib64/python3.5/tool.py�mains0!	&r(�__main__)rrrrr(�__name__r&r&r&r'�<module>
s

?>