3 ms·
My personal favorite solves the same problem but attacks it differently. > Make JSON greppable! > gron[1] transforms JSON into discrete assignments to make it
by topher200 6y ago
My personal favorite solves the same problem but attacks it differently.
> Make JSON greppable!
> gron[1] transforms JSON into discrete assignments to make it easier to grep for what you want and see the absolute 'path' to it. It eases the exploration of APIs that return large blobs of JSON but have terrible documentation.
▶ gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author"
json[0].commit.author = {};
json[0].commit.author.date = "2016-07-02T10:51:21Z";
json[0].commit.author.email = "mail@tomnomnom.com";
json[0].commit.author.name = "Tom Hudson";
[1] https://github.com/tomnomnom/gron https://github.com/tomnomnom/gron
- sitkack 6y agoGron and Jq are like peanut butter and jelly. Also gron has `gron -u` (ungron) to turn the pivot back into json.