#get
curl -H 'Content-Type: application/json' url
#post
curl -H 'Content-Type: application/json' -X POST -d "{'foo':'bar'}}" url
#pretty print
curl -s -H 'Content-Type: application/json' url | python -m json.tool
#simple script, docs: http://docs.python.org/library/json.html
curl -s -H 'Content-Type: application/json' url | \
python -c "import sys, json; j = json.load(sys.stdin); print(j);"