I use jq to pretty-print it.
jq
is a lightweight and flexible command-line JSON processor.
jq
is written in portable C, and it has zero runtime dependencies.
E.g.
Without JSON formatter
$ curl -s http://localhost:3000; echo
{"account":{"id":"HXRC","uri":["mailto:Lizzie.Koepp@hotmail.com","tel:366-643-7219"],"features":["585"],"nickname":"Consultant"}}
Install jq
(Ubuntu):
$ sudo apt-get install jq
Use jq
json formatter.
$ curl -s http://localhost:3000 | jq '.'
{
"account": {
"id": "HXRC",
"uri": [
"mailto:Lizzie.Koepp@hotmail.com",
"tel:366-643-7219"
],
"features": [
"585"
],
"nickname": "Consultant"
}
}
You can find more examples in tutorial. You can find the installation for each OS in download page