Skip to content

Comment on Jshon: A command line program to parse, read and create JSON

Comments

Note for simple uses, Python 2.6+ comes with the "json.tool" module (also part of simplejson if you're <= 2.5), which reads JSON on stdin (or argv[1]) before pretty printing it.

    $ type json
    json is aliased to `python -m json.tool'
    $ curl -s twitter.com/users/BarackObama.json|json|grep '"url"'
        "url": "http://www.barackobama.com",

Please never use grep on json. If you are going to use python as a heavyweight json_reformat, at least have the decency to use all of python's excellent json lib.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.