Last Updated: February 25, 2016
·
2.992K
· n3bulous

Easily Format JSON Output from CURL

Add this to your shell config (ZSH and Mountain Lion tested) and source it.

function jsoncurl() {
  curl "$@" | python -mjson.tool
}

Now you can quickly edit any provided curl commands by prepending json and removing the verbose (-v) and header (-i/-I) options.