U e5dßã @sfddlZddlZddlZdd„Zedkrbz eƒWn.ek r`Zze ej¡W5dZ[XYnXdS)éNc Cs4d}d}tj||d�}|jddtjdd�dtjd �|jd dtjd dd�d tjd �|jd dddd�|jddddd�| ¡}|j}|j }|j }|j }|�Ž|�~zJ|rºdd„|Dƒ}n t   |¡f}|D] } t j| ||dd�| d¡qÊWn,tk �r} z t| ƒ‚W5d} ~ XYnXW5QRXW5QRXdS)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 formatcss|]}t |¡VqdS)N)ÚjsonÚloads)Ú.0Úline©rú!/usr/lib64/python3.8/json/tool.pyÚ ,szmain..é)Ú sort_keysÚindentÚ )ÚargparseÚArgumentParserÚ add_argumentZFileTypeÚsysÚstdinÚstdoutÚ parse_argsrr rÚ json_linesrÚloadÚdumpÚwriteÚ ValueErrorÚ SystemExit) rrÚparserZoptionsrr rr!ZobjsÚobjÚerrrÚmainsD ý ý ÿ ÿ  r*Ú__main__) rrrr*Ú__name__ÚBrokenPipeErrorÚexcÚexitÚerrnorrrrÚ s$