What does HackerNews think of gron?

Make JSON greppable!

Language: Go

If JQ is too much, see GRON &| Miller

gron transforms JSON into discrete assignments to make it easier to grep for what you want https://github.com/tomnomnom/gron

Miller is like awk, sed, cut, join, and sort for data formats such as CSV, TSV, JSON, JSON https://github.com/johnkerl/miller

I find `gron` to be very helpful for generating jq query strings

https://github.com/tomnomnom/gron

Perhaps there is kind of a way to improve JSON without changing JSON: use the gron format [0] as config.

Tools can parse it as JSON and that’s it.

[0]: https://github.com/tomnomnom/gron

There seems to be a few comments from people that dislike jq. If you're that way inclined, gron[0] might be more your thing.

[0] https://github.com/tomnomnom/gron

And jless [1] and gron [2].

This is the first I'm hearing of gron, but adding here for completeness sake. Meanwhile, JSON seems to be becoming a standard for CLI tools. Ideal scenario would be if every CLI tool has a --json flag or something similar, so that jc is not needed anymore.

[1] https://jless.io/

[2] https://github.com/tomnomnom/gron

If you’re like me and use jq infrequently enough that you have to consult the documentation every time, try gron. It’s greppable json

https://github.com/tomnomnom/gron

Make JSON greppable!

https://github.com/tomnomnom/gron

I've been using `jq` for years and I'm always able to cobble together what I need, but I have yet to find it intuitive and I'm rarely able to arrive at a solution of any complexity without spending a lot of time reading its documentation. I wish I found it easier to use. :-(

A useful tool for transforming JSON to and from a format that is more amenable to simple text tooling is gron: https://github.com/tomnomnom/gron

Takes all the tree and hierarchy management away, makes it so ordering doesn’t matter.

If I’m generating JSON from batch scripts it’s my preferred tool (easier than fighting jq for many tasks)

gron https://github.com/tomnomnom/gron

It takes JSON input and produces flat, key-value output based on the path to the value. Usage with grep was obviously the original intention, but I've used it to help me better understand a given JSON's structure, too, which I then usually reflect back into a program that's consuming that JSON.

It also supports "ungron" too, so, for example, `gron some.json | grep -v "thing I don't want" | gron -u > filtered.json" makes for quick filtering of a JSON. I find it more user friendly than jq's language.

You should checkout gron, it is great at flattening fragments of json.

https://github.com/tomnomnom/gron

Some alternative ideas for making JSON more readable:

- Pipe into gron (https://github.com/tomnomnom/gron) to get a `foo.bar.baz = val` kind of syntax.

- Pipe into visidata (https://www.visidata.org/) to get a spreadsheet-like editable view.

Unrelated tool but also very useful in combination with JQ: gron

https://github.com/tomnomnom/gron

This is the kind of thing gron [1] would be good for. A diff on the gron output before and after should contain all the info needed.

[1] https://github.com/tomnomnom/gron

Same boat here. I ended up finding gron https://github.com/tomnomnom/gron which resolved that issue for me. Now I don't have to look up how to use jq each time I want to quickly find something in some JSON.
Whenever jq comes up I feel obligated to mention 'gron'[1]. If all you're doing is trying to grep some deeply nested field, it's way easier with gron, IMHO.

[1] https://github.com/tomnomnom/gron