So for CURL, you could do the following:
echo '{"foo": "lorem", "bar": "ipsum"}' | python -m json.tool curl https://some.es.url/blah | python -m json.tool
Would that be satisfactory ? Source: http://stackoverflow.com/questions/352098/how-can-i-pretty-print-json