Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/json/tool.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Qc@sAdZddlZddlZd�Zedkr=e�ndS(sCommand-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)

i�NcCs>ttj�dkr*tj}tj}n�ttj�dkrattjdd�}tj}n[ttj�dkr�ttjdd�}ttjdd�}nttjdd��|�ytj|�}Wnt	k
r�t|��nXWdQX|�tj
||dtd	d
dd�|jd�WdQXdS(Niitrbitwbis [infile [outfile]]t	sort_keystindentit
separatorst,s: s
(Rs: (
tlentsystargvtstdintstdouttopent
SystemExittjsontloadt
ValueErrortdumptTruetwrite(tinfiletoutfiletobjte((s/sys/lib/python2.7/json/tool.pytmains&	
t__main__(t__doc__RR
Rt__name__(((s/sys/lib/python2.7/json/tool.pyt<module>s
	

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].