• File: tool.cpython-38.opt-2.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/proc/self/root/opt/alt/python38/lib64/python3.8/json/__pycache__/tool.cpython-38.opt-2.pyc
  • Date Modified: 10/26/2026 8:15 PM
  • File size: 1.58 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
U

if
@sfddlZddlZddlZddZedkrbz
eWn.ek
r`ZzeejW5dZ[XYnXdS)NcCs4d}d}tj||d}|jddtjdddtjd	|jd
dtjddddtjd	|jd
dddd|jddddd|}|j}|j	}|j
}|j}||~zJ|rdd|D}nt
|f}|D] }	tj|	||dd|dqWn,tk
r}
zt|
W5d}
~
XYnXW5QRXW5QRXdS)Nzpython -m json.toolzZA simple command line interface for json module to validate and pretty-print JSON objects.)progdescriptioninfile?zutf-8)encodingz-a JSON file to be validated or pretty-printed)nargstypehelpdefaultoutfilewz%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)jsonloads).0liner./opt/alt/python38/lib64/python3.8/json/tool.py	<genexpr>,szmain.<locals>.<genexpr>)	sort_keysindent
)argparseArgumentParseradd_argumentZFileTypesysstdinstdout
parse_argsrrr
json_linesrloaddumpwrite
ValueError
SystemExit)rrparserZoptionsrrrr!ZobjsobjerrrmainsD


r*__main__)	rrrr*__name__BrokenPipeErrorexcexiterrnorrrr<module>
s$