Posts List

GoJSONQ

API for different queries Sample data (data.json) { “name”:“computers”, “description”:“List of computer products”, “prices”:[2400, 2100, 1200, 400.87, 89.90, 150.10], “names”:[“John Doe”, “Jane Doe”, “Tom”, “Jerry”, “Nicolas”, “Abby”], “items”:[ { “id”:1, “name”:“MacBook Pro 13 inch retina”, “price”:1350 }, { “id”:2, “name”:“MacBook Pro 15 inch retina”, “price”:1700 }, { “id”:3, “name”:“Sony VAIO”, “price”:1200 }, { “id”:4, “name”:“Fujitsu”, “price”:850 }, { “id”:null, “name”:“HP core i3 SSD”, “price”:850 } ] }

Query JSON data using Golang (gojsonq package)

Most often developer needs to consume JSON data from other service and query over them. Querying JSON data is little time consuming. For the last few days I was working on a package for Golang to query JSON data easily. The idea and inspiration comes form PHP-JSONQ by Nahid Bin Azhar. Lets take a sample JSON data to start with: Now we are ready to query the data, lets see some examples