JSON and YAML are everywhere. Here are 10 tools that make working with them significantly easier.
1. jq¶
cat data.json | jq ‘.’ cat data.json | jq ‘.users[] | {name, email}’
2. yq¶
yq ‘.services.app.image’ docker-compose.yml yq -o json docker-compose.yml
3. fx — Interactive Viewer¶
curl api.example.com | fx
4. python -m json.tool¶
echo ‘{“a”:1}’ | python3 -m json.tool
5. yamllint¶
yamllint docker-compose.yml
6. dasel¶
dasel -f config.yml ‘.database.host’
7. gron¶
gron data.json | grep “email”
8. jless¶
cat data.json | jless
9. Miller (mlr)¶
mlr –icsv –ojson cat data.csv
10. jo¶
jo name=John age=30 active=true
Recommendations¶
At a minimum jq and yq — you’ll use them daily.