Comment

David Wilson

Using simplejson + Python2.5 or Python2.6 upwards:

$ curl -s http://twitter.com/users/show/microsoft.json | json
$ type json
json is aliased to `python -m json.tool'

Replies

Peter Bengtsson

That's awesome! No need to install a custom script.

It's because of comments like this that I blog. Had I not jotted down my thoughts I wouldn't probably have learned about the simplejson tool.

David Wilson

I found it in the course of writing the exact same script you wrote. :) It's sweet that these things are bundled with a default Python install (along with -m SimpleHTTPServer etc.)

David

Panos Laganakos

Thanks David, this is really handy :)