3 ms·
In addition to jq (already mentioned) here are some other useful CLI tools for dealing with JSON data. Descriptions are directly from GitHub. Note: dsq also has
by luckman212 5y ago
In addition to jq (already mentioned) here are some other useful CLI tools for dealing with JSON data. Descriptions are directly from GitHub. Note: dsq also has a companion GUI app called DataStation[0] if you're looking for that.
fx: Command-line JSON processing tool - https://github.com/antonmedv/fx https://github.com/antonmedv/fx
dasel: JSON, YAML, TOML, XML, and CSV query and modification tool - https://github.com/TomWright/dasel https://github.com/TomWright/dasel
dsq: CLI tool for running SQL queries against JSON, CSV, Excel, Parquet, and more - https://github.com/multiprocessio/dsq https://github.com/multiprocessio/dsq
gron: Make JSON greppable - https://github.com/tomnomnom/gron https://github.com/tomnomnom/gron
jello: Filter JSON and JSON Lines data with Python syntax - https://github.com/kellyjonbrazil/jello https://github.com/kellyjonbrazil/jello
jless: Command-line pager for JSON data - https://github.com/PaulJuliusMartinez/jless https://github.com/PaulJuliusMartinez/jless
jid: Json incremental digger - https://github.com/simeji/jid https://github.com/simeji/jid
jql: JSON query language CLI tool - https://github.com/yamafaktory/jql https://github.com/yamafaktory/jql
qp: Command-line (ND)JSON querying - https://github.com/paybase/qp https://github.com/paybase/qp
[0]: https://github.com/multiprocessio/datastation https://github.com/multiprocessio/datastation
- leonim 5y agoI would add VisiData to that list. It is more suited for tabular data, but it can be used to explore large nested data. I find it is a good starting place to explore json data I'm not familiar with. I will also sometimes flatten the data with some general jq scripts or gron. If I'm trying to understand some new json data, I start with visidata, and then I poke around to find the data I want. If it is data I want to extract again, I use jq to get the interesting bits. Sometimes I use that in combination with sqlite-utils to store that data so I can query it. (I haven't tried some of the other tools that will create a sqlite database for you.) - https://github.com/saulpw/visidata https://github.com/saulpw/visidata - https://github.com/simonw/sqlite-utils https://github.com/simonw/sqlite-utils