Here is a really simple way to pretty print some unformatted json

$ echo '{"foo": "lorem", "bar": "ipsum"}' | python -mjson.tool
{
"bar": "ipsum",
"foo": "lorem"
}