| Server IP : 46.17.175.229 / Your IP : 216.73.216.250 Web Server : LiteSpeed System : Linux lt-bnk-web1163.main-hosting.eu 4.18.0-553.157.1.lve.el8.x86_64 #1 SMP Mon Aug 24 17:05:39 UTC 2026 x86_64 User : u528038015 ( 528038015) PHP Version : 8.2.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/usr/lib64/python3.8/json/__pycache__/ |
Upload File : |
U
e5d� �
@ sf d dl Z d dlZd dlZdd� Zedkrbz
e� W n. ek
r` Z ze�ej� W 5 dZ[X Y nX dS )� Nc C s4 d} d}t j| |d�}|jddt jdd�dtjd � |jd
dt jddd�dtjd � |jd
dddd� |jddddd� |�� }|j}|j }|j
}|j}|�� |�~ zJ|r�dd� |D �}nt�
|�f}|D ] } tj| ||dd� |�d� q�W n, tk
�r }
zt|
��W 5 d }
~
X Y nX W 5 Q R X W 5 Q R X d S )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 formatc s s | ]}t �|�V qd S )N)�json�loads)�.0�line� r �!/usr/lib64/python3.8/json/tool.py� <genexpr>, s zmain.<locals>.<genexpr>� )� sort_keys�indent�
)�argparse�ArgumentParser�add_argumentZFileType�sys�stdin�stdout�
parse_argsr r r �
json_linesr �load�dump�write�
ValueError�
SystemExit)r r �parserZoptionsr r r r! Zobjs�obj�er r r �main sD
��
�
�r* �__main__) r r r r* �__name__�BrokenPipeError�exc�exit�errnor r r r �<module>
s $