top | item 23427412

(no title)

benjaminoakes | 5 years ago

I find gron to be much more Unix-y than jq. It "explodes" JSON into single lines for use with grep, sed, etc and can recombine back into JSON as well.

https://github.com/TomNomNom/gron

discuss

order

majewsky|5 years ago

Since jq is sed for JSON, by the transitive property, you're saying that sed is not Unix-y. ;)

Seriously though, I use both, and IMO they serve different purposes. gron is incredibly useful for exploring unknown data formats, especially with any form of

  something | gron | grep something
Once you've figured out how the data format in question works, a jq script is usually more succinct and precise than a chain of gron/{grep,awk,sed,...}/ungron.

So in practice, gron for prompts and jq for scripts.