o ?Og @sz ddlZddlZddlZddlmZddZedkr;zeWdSey:Zz e ej WYdZ[dSdZ[wwdS)N)Pathc Csd}d}tj||d}|jddtjdddtjd |jd dtd dd |jd d ddd|jddddd|jdd ddd|}|jddtdd|jddddd d!|jd"dddd#d!|jd$d d%d&| }|j |j |j d'}|j rd|d<d(|d)<|jd}zJ|jrd*d+|D}nt|f}|jdurtj}n|jjd,dd}|} |D]} tj| | fi|| d-qWdn1swYWnty} zt| d} ~ wwWddS1swYdS).Nzpython -m json.toolzZA simple command line interface for json module to validate and pretty-print JSON objects.)prog descriptioninfile?zutf-8)encodingz-a JSON file to be validated or pretty-printed)nargstypehelpdefaultoutfilez%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_asciiZ 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--indentzJseparate items with newlines and use this number of spaces for indentation)r r r z--tabZ store_constindent z9separate items with newlines and use tabs for indentation)rrZconstr z --no-indentz/separate items with spaces rather than newlinesz --compactz1suppress all whitespace separation (most compact))rr ) sort_keysrr),:Z separatorscss|]}t|VqdS)N)jsonloads).0liner0/opt/alt/python310/lib64/python3.10/json/tool.py Aszmain..w )argparseArgumentParser add_argumentZFileTypesysstdinrZadd_mutually_exclusive_groupint parse_argsrrrcompactrZ json_linesrloadr stdoutopendumpwrite ValueError SystemExit) rrparsergroupZoptionsZ dump_argsrZobjsoutr objerrrmains          "r4__main__) r rr#Zpathlibrr4__name__BrokenPipeErrorexcexiterrnorrrrs  >