관리-도구
편집 파일: tool.cpython-37.pyc
B VX�Yp � @ 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 ytj| tj dd �}W n$ t k r� tt�� d ��Y nX W d Q R X |�$ tj||dd dd� |� d� W d Q R X d S ) N� � �r� �wr z [infile [outfile]]T)�object_pairs_hook�use_decimalz )� sort_keys�indentr � )�len�sys�argv�stdin�stdout�open� SystemExit�json�load�OrderedDict� ValueError�exc_info�dump�write)�infile�outfile�obj� r �B/opt/alt/python37/lib64/python3.7/site-packages/simplejson/tool.py�main s( r �__main__)�__doc__� __future__r r � simplejsonr r �__name__r r r r �<module> s