Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/self/root/opt/alt/python311/lib64/python3.11/json/__pycache__/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/opt/alt/python311/lib64/python3.11/json/__pycache__/tool.cpython-311.pyc

�

c��f
���dZddlZddlZddlZddlmZd�Zedkr5	e��dS#e$r Z	ej
e	j��YdZ	[	dSdZ	[	wwxYwdS)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)

�N)�Pathc��d}d}tj||���}|�ddtjd���dtj�	��|�d
dtdd�	��|�dd
dd���|�dddd���|�dd
dd���|���}|�ddtd���|�ddddd �!��|�d"dddd#�!��|�d$d
d%�&��|�	��}|j
|j|jd'�}|j
r
d|d<d(|d)<|j5}	|jr
d*�|D��}nt!j|��f}|j�
tj}n|j�d+d���}|5}	|D]*}
t!j|
|	fi|��|	�d,���+	ddd��n#1swxYwYn!#t.$r}t1|���d}~wwxYwddd��dS#1swxYwYdS)-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�outfilez%write the output of infile to outfilez--sort-keys�
store_trueFz5sort the output of dictionaries alphabetically by key)�actionr
rz--no-ensure-ascii�ensure_ascii�store_falsez(disable escaping of non-ASCII characters)�destrrz--json-linesznparse input using the JSON Lines format. Use with --no-indent or --compact to produce valid JSON Lines output.z--indent�zJseparate items with newlines and use this number of spaces for indentation)r
rrz--tab�store_const�indent�	z9separate items with newlines and use tabs for indentation)rr�constrz--no-indentz/separate items with spaces rather than newlinesz	--compactz1suppress all whitespace separation (most compact))rr)�	sort_keysrr)�,�:�
separatorsc3�>K�|]}tj|��V��dS)N)�json�loads)�.0�lines  �0/opt/alt/python311/lib64/python3.11/json/tool.py�	<genexpr>zmain.<locals>.<genexpr>As,����<�<�T��
�4�(�(�<�<�<�<�<�<��w�
)�argparse�ArgumentParser�add_argument�FileType�sys�stdinr�add_mutually_exclusive_group�int�
parse_argsrrr�compactr�
json_linesr�loadr�stdout�open�dump�write�
ValueError�
SystemExit)rr�parser�group�options�	dump_argsr�objs�outr�obj�es            r"�mainrAs��� �D�@�K�
�
$�$�K�
H�
H�
H�F�
�����%�.��@�@�@�L� #�	��+�+�+����	��!�D� $��&�&�&����
�l�E�T��V�V�V�
���+�.��G��I�I�I�
����|�U�`��a�a�a�
�/�/�1�1�E�	���z�1�3�3��4�4�4�
���w�}�8�!�).��/�/�/�
���}�]��!�M��O�O�O�
���{�<�O��Q�Q�Q����!�!�G��&��.��,���I�
��+�"�	�(��"*�	�,��	�� �6�	 ��!�
,�<�<�V�<�<�<����	�&�)�)�+����&��j����o�*�*�3��*�A�A���
(���(�(�C��I�c�7�8�8�i�8�8�8��M�M�$�'�'�'�'�(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(����	 �	 �	 ��Q�-�-������	 ���� � � � � � � � � � � � ���� � � � � � s[�;I
�=AH�.H�H�H	�H�H	�H�I
�
H=�)H8�8H=�=I
�
I�I�__main__)�__doc__r'rr+�pathlibrrA�__name__�BrokenPipeError�exc�exit�errno�r$r"�<module>rKs�������������
�
�
�
�������; �; �; �|�z���������������������������������������s�
+�A�A�A

Hacked By AnonymousFox1.0, Coded By AnonymousFox