Ë
    òT•j  ã                   óª   — d Z ddlZddlZddlZddlmZ d„ Zedk(  r		  e«        yy# e$ r&Z	 ej                  e	j                  «       Y dZ	[	ydZ	[	ww xY w)a  Command-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}t        j                  | |¬«      }|j                  ddt        j                  d¬«      dt        j
                  ¬	«       |j                  d
dt        dd ¬	«       |j                  dddd¬«       |j                  dddd¬«       |j                  dddd¬«       |j                  «       }|j                  ddt        d¬«       |j                  ddddd ¬!«       |j                  d"ddd d#¬!«       |j                  d$dd%¬&«       |j                  «       }|j                  |j                  |j                  d'œ}|j                  r
d |d<   d(|d)<   |j                  5 }	 |j                  r
d*„ |D «       }nt!        j"                  |«      f}|j$                  €t        j&                  }n|j$                  j)                  d+d¬«      }|5 }	|D ]*  }
t!        j*                  |
|	fi |¤Ž |	j-                  d,«       Œ, 	 d d d «       d d d «       y # 1 sw Y   ŒxY w# t.        $ r}t1        |«      ‚d }~ww xY w# 1 sw Y   y xY w)-Nzpython -m json.toolzZA simple command line interface for json module to validate and pretty-print JSON objects.)ÚprogÚdescriptionÚinfileú?zutf-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)Údestr   r   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   r   r   z--tabÚstore_constÚindentú	z9separate items with newlines and use tabs for indentation)r   r   Úconstr   z--no-indentz/separate items with spaces rather than newlinesz	--compactz1suppress all whitespace separation (most compact))r   r   )Ú	sort_keysr   r   )ú,ú:Ú
separatorsc              3   óF   K  — | ]  }t        j                  |«      –— Œ y ­w)N)ÚjsonÚloads)Ú.0Úlines     ú /usr/lib/python3.12/json/tool.pyú	<genexpr>zmain.<locals>.<genexpr>A   s   è ø€ Ò<¨TœŸ
™
 4×(Ñ<ùs   ‚!Úwú
)ÚargparseÚArgumentParserÚadd_argumentÚFileTypeÚsysÚstdinr   Úadd_mutually_exclusive_groupÚintÚ
parse_argsr   r   r   Úcompactr   Ú
json_linesr   Úloadr   ÚstdoutÚopenÚdumpÚwriteÚ
ValueErrorÚ
SystemExit)r   r   ÚparserÚgroupÚoptionsÚ	dump_argsr   ÚobjsÚoutr   ÚobjÚes               r"   Úmainr@      s‡  € Ø €Dð@€Kä×$Ñ$¨$¸KÔH€FØ
×Ñ˜¨Ü%×.Ñ.¸Ô@ØLÜ #§	¡	ð ô +ð ×Ñ˜	¨Ü!ØDØ $ð ô &ð ×Ñ˜¨lÀEØTð ô Và
×ÑÐ+°.ÈØGð ô Ià
×Ñ˜¨|ÀUð`ð ô að ×/Ñ/Ó1€EØ	×Ñ�z¨1´3ð3ð ô 4ð 
×Ñ�w }¸8Ø!ð ).ð ô /ð 
×Ñ�}¨]ÀØ!ØMð ô Oð 
×Ñ�{¨<ØOð ô Qà×ÑÓ!€Gð ×&Ñ&Ø—.‘.Ø×,Ñ,ñ€Ið
 ‡‚Ø"ˆ	�(ÑØ"*ˆ	�,Ñà	�‰ð  ˜6ð	 Ø×!Ò!Ù<°VÔ<‘äŸ	™	 &Ó)Ð+�à�‰Ð&Ü—j‘j‘à—o‘o×*Ñ*¨3¸Ð*ÓA�Øð (˜Øò (�CÜ—I‘I˜c 7Ñ8¨iÒ8Ø—M‘M $Õ'ñ(÷(÷ ð  ÷(ð (ûô ò 	 Ü˜Q“-Ðûð	 ú÷ ð  úsC   Å,I Å.A(H$Ç0HÈH$ÈH!	ÈH$È$	H=È-H8È8H=È=I É I	Ú__main__)Ú__doc__r&   r   r*   Úpathlibr   r@   Ú__name__ÚBrokenPipeErrorÚexcÚexitÚerrno© ó    r"   ú<module>rK      s^   ðñó Û Û 
Ý ò; ð| ˆzÒðÙ�ð øð ò Øˆ�‰�—‘×Ñûðús   ž' §A¬AÁA