LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gron

Make JSON greppable

TLDR

Convert JSON to gron
$ gron [file.json]
copy
Pipe JSON to gron
$ curl [api/url] | gron
copy
Filter with grep
$ gron [file.json] | grep [pattern]
copy
Convert back to JSON
$ gron [file.json] | grep [filter] | gron -u
copy
Colorize output
$ gron --color [file.json]
copy

SYNOPSIS

gron [options] [file]

DESCRIPTION

gron transforms JSON into discrete path-value assignments, making it greppable with standard Unix tools. Each JSON value becomes a single line showing its full path from the root.Results can be filtered with grep and converted back to valid JSON using ungron mode (-u), enabling powerful JSON querying without specialized tools.

PARAMETERS

FILE

JSON file to process.
-u, --ungron
Convert gron back to JSON.
-s, --stream
Stream processing mode.
--color
Colorize output.
--no-sort
Preserve original order.
-j, --json
Output as JSON.
--help
Display help information.

INSTALL

sudo apt install gron
copy
sudo pacman -S gron
copy
sudo apk add gron
copy
sudo zypper install gron
copy
brew install gron
copy
nix profile install nixpkgs#gron
copy

CAVEATS

Large JSON files produce many lines. Path syntax may vary. Ungron requires valid gron format.

HISTORY

gron was created by Tom Hudson to solve the problem of searching complex JSON structures with traditional Unix tools.

SEE ALSO

jq(1), grep(1), json_pp(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid