gron - Man Page
Transform JSON into discrete assignments to make it greppable
Synopsis
gron [Options][FILE|URL|-]
Description
gron 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.
Options
- -u, --ungron
Reverse the operation (turn assignments back into JSON)
- -c, --colorize
Colorize output (default on tty)
- -m, --monochrome
Monochrome (don't colorize output)
- -s, --stream
Treat each line of input as a separate JSON object
- -k, --insecure
Disable certificate validation
- -j, --json
Represent gron data as JSON stream
- --no-sort
Don't sort output (faster)
- --version
Print version information
Exit Codes
- 0
OK
- 1
Failed to open file
- 2
Failed to read input
- 3
Failed to form statements
- 4
Failed to fetch URL
- 5
Failed to parse statements
- 6
Failed to encode JSON
Examples
gron /tmp/apiresponse.json
gron http://jsonplaceholder.typicode.com/users/1
curl -s http://jsonplaceholder.typicode.com/users/1 | gron
gron http://jsonplaceholder.typicode.com/users/1 | grep company | gron --ungron