| Server IP : 138.197.176.125 / Your IP : 216.73.217.54 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/simplejson/__pycache__/ |
Upload File : |
U
�O5[p � @ s: d Z ddlmZ ddlZddlZdd� Zedkr6e� dS )a Command-line tool to validate and pretty-print JSON
Usage::
$ echo '{"json":"obj"}' | python -m simplejson.tool
{
"json": "obj"
}
$ echo '{ 1.2:3.4}' | python -m simplejson.tool
Expecting property name: line 1 column 2 (char 2)
� )�with_statementNc C s t tj�dkrtj} tj}nht tj�dkrBttjd d�} tj}nBt tj�dkrrttjd d�} ttjd d�}nttjd d ��| �B ztj| tj dd �}W n$ t
k
r� tt�� d ��Y nX W 5 Q R X |�$ tj||dd
dd� |�
d� W 5 Q R X d S )
N� � �r� �wr z [infile [outfile]]T)Zobject_pairs_hook�use_decimalz )Z sort_keys�indentr �
)�len�sys�argv�stdin�stdout�open�
SystemExit�json�load�OrderedDict�
ValueError�exc_info�dump�write)ZinfileZoutfile�obj� r �1/usr/lib/python3/dist-packages/simplejson/tool.py�main s* �
r �__main__)�__doc__Z
__future__r r Z
simplejsonr r �__name__r r r r �<module> s