HEX
Server: Apache/2.4.62 (Debian)
System: Linux MIA-VPS-VM01781 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64
User: webmaster (1001)
PHP: 8.2.29
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //lib/python3.7/json/__pycache__/tool.cpython-37.pyc
B

U��e��@s6dZddlZddlZddlZdd�Zedkr2e�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�}|jddt��dd�|jddt�d	�d
d�|jddd
dd�|��}|jphtj}|jpttj	}|j
}|�@yt�|�}Wn*t
k
r�}zt|��Wdd}~XYnXWdQRX|�"tj|||dd�|�d�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�)�	sort_keys�indent�
)�argparse�ArgumentParser�add_argumentZFileType�
parse_argsr�sys�stdinr	�stdoutr�json�load�
ValueError�
SystemExit�dump�write)	rr�parserZoptionsrr	r�obj�e�r"�/usr/lib/python3.7/json/tool.py�mains*
$r$�__main__)�__doc__rrrr$�__name__r"r"r"r#�<module>s