gron Training Sessions
Master JSON structure discovery with gron. gron flattens JSON into greppable assignment statements — use it when you don’t know the shape of your data.
Training Philosophy
-
gron is for discovery, jq is for extraction — different tools, complementary
-
Real APIs - GitHub, infrastructure tools, real JSON
-
Round-trip - gron → grep → ungron reconstructs filtered JSON
-
Composition - gron finds the path, jq extracts the value
Quick Start
# Run the drill menu
bash ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/examples/gron-drills/00-run-drill.sh
# Or run a specific drill
bash ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/examples/gron-drills/00-run-drill.sh 01
When to Use gron vs jq vs yq
| Tool | When to use |
|---|---|
|
You don’t know the structure yet. Flatten, grep, discover paths. |
|
You know the structure. Extract, reshape, filter, aggregate. |
|
Input is YAML. Convert to JSON with |
Related
-
jq Training - JSON processing
-
yq Training - YAML processing