Consuming Web API JSON Data Using curl and jq


Hey everyone!  I decided to put a few extra batteries in the background color of the article image above. 🙂  I’m actually pretty charged up about our topic today, particularly about jq, which is a lightweight and flexible command-line JSON processor with “batteries included”.

JSON has become the lingua franca for exchanging data on the web, and we (as developers) need to know how to process JSON data so we can be positioned for the present and for the future. We recently learned about Consuming Node.js Microservices Created with Stdlib which provided a high-level tour covering several methods for parsing and processing JSON data. Today, we’re zooming in and learning more about consuming Web API JSON data from bash using curl and jq. Once again, we’ll be consuming data from a microservice created with the excellent stdlib platform. Our learning, however, will be universally applicable for consuming Web API JSON data from any http endpoint. Most importantly, we’re going to have fun in the process! 🙂 Continue reading