discoposse

jq - the nifty command-line JSON parser

Discussion created by discoposse Expert on Feb 17, 2017

If you're starting to mess around with the Turbonomic RESTful API, you'll see that pushing output to the console can often leave you struggling with readability:

 

 

One of the very cool tools that I've used a lot lately is one called jq which is a command-line JSON parser.  You can get the tool for your OS of choice at the jq product homepage and then when you pipe the output of your curl results to the jq tool, they come out in the format we call "pretty print":

 

I posted up a blog at my personal blog site ( http://discoposse.com/2016/09/13/using-jq-to-pretty-print-json-output/  ) about how to use it wth a couple of simple switches.  Hopefully you will find it to be helpful! 

Outcomes