Được TopGit lập chỉ mục từ metadata GitHub: tomnomnom/gron có 14.5k sao, viết chủ yếu bằng Go. Make JSON greppable!
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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 but have terrible documentation.
Disclaimer: the GitHub API has fantastic documentation, but it makes for a good example.
Installation
gron has no runtime dependencies. You can just download a binary for Linux, Mac, Windows or FreeBSD and run it.
Put the binary in your $PATH (e.g. in /usr/local/bin) to make it easy to use:
▶ tar xzf gron-linux-amd64-0.1.5.tgz
▶ sudo mv gron /usr/local/bin/
If you're a Mac user you can also install gron via brew:
▶ brew install gron
Or if you're a Go user you can use go install:
▶ go install github.com/tomnomnom/gron@latest
It's recommended that you alias ungron or norg (or both!) to gron --ungron. Put something like this in your shell profile (e.g. in ~/.bashrc):
alias norg="gron --ungron"
alias ungron="gron --ungron"
Or you could create a shell script in your $PATH named ungron or norg to affect all users:
If you get creative you can do some pretty neat tricks with gron, and
then ungron the output back into JSON.
Get Help
▶ gron --help
Transform JSON (from a file, URL, or stdin) into discrete assignments to make it greppable
Usage:
gron [OPTIONS] [FILE|URL|-]
Options:
-u, --ungron Reverse the operation (turn assignments back into JSON)
-v, --values Print just the values of provided assignments
-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
FAQ
Wasn't this written in PHP before?
Yes it was! The original version is preserved here for posterity.
Why the change to Go?
Mostly to remove PHP as a dependency. There's a lot of people who work with JSON who don't have PHP installed.
Why shouldn't I just use jq?
jq is awesome, and a lot more powerful than gron, but with that power comes
complexity. gron aims to make it easier to use the tools you already know, like grep and sed.
gron's primary purpose is to make it easy to find the path to a value in a deeply nested JSON blob
when you don't already know the structure; much of jq's power is unlocked only once you know that structure.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/tomnomnom/gron là nguồn chính thức.
tomnomnom/gron có những chủ đề gì?
GitHub topics của tomnomnom/gron: "cli", "json". TopGit xếp repo vào nhóm Developer Tools.
tomnomnom/gron có phải mã nguồn mở không?
Có — tomnomnom/gron phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/tomnomnom/gron.
tomnomnom/gron có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho tomnomnom/gron. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
tomnomnom/gron còn đang phát triển không?
Commit gần nhất trên tomnomnom/gron là 1.5 năm trước (theo timestamp GitHub). Repo có 348 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
tomnomnom/gron dùng license gì?
tomnomnom/gron phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc gron có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về gron.