2 ms·
Plus jq and curl might not even be installed. And I never got warm with jq, so if I need to parse json from shell I reach for... python. Really.
by nolist_policy 2y ago
Plus jq and curl might not even be installed. And I never got warm with jq, so if I need to parse json from shell I reach for... python. Really.
- radiator 2y agoAlternatively, maybe you can get warmer with JMESPath, which has jp as its command line interface https://github.com/jmespath/jp https://github.com/jmespath/jp . The good thing about the JMESPath syntax is that it is the standard one when processing JSON in software like Ansible, Grafana, perhaps some more.
- mywittyname 2y agoI'm an avid jq user. There are certainly situations where it's better to use python because it's just more sane and easier to read/write, but jq does a few things extremely well, namely, compressing json, and converting json files consisting of big-ass arrays into line delimited json files.