Posts

Showing posts with the label json

pretty print json

Pretty Print JSON How to pretty print json from the command line? $ echo '{"foo": "lorem", "bar": "ipsum"}' | python -mjson.tool { "bar": "ipsum", "foo": "lorem" } $ python -mjson.tool < /tmp/input.json { "bar": "ipsum", "foo": "lorem" } $ curl http://rene.f0o.com/~rene/json_example.json | python -mjson.tool { "bar": "ipsum", "foo": "lorem" }