Pretty print json output from curl

A lot of us use curl to quickly test an API endpoint. If the API endpoint returns JSON, it is but natural to want it to be formatted.

curl {{your_url}} | json_pp

Just pipe your curl command with json_pp and it should pretty print the response

In case json_pp is not installed you can install it from here

Leave a Reply

Your email address will not be published. Required fields are marked *