JQL
A JSON Query Language CLI tool built with Rust 🦀
📜 Core philosophy
- 📦 Stay lightweight (12kB only!)
- 🎮 Keep its features as simple as possible
- 🧠 Avoid redundancy
- 💡 Provide meaningful error messages
- ↔️ Eat JSON as input, process, output JSON back
🚀 Installation
🛠️ Usage
If you find some of the following examples confusing, please have a look at The JavaScript Object Notation (JSON) Data Interchange Format.
Root selection
"This is a valid JSON text with one value"
"This is a valid JSON text with one value"
Child selection
"yay!"
Index selection
7
Please note that the following is also valid:
7
You can also select a set of indexes:
Range selection
Please note that you can reverse it:
Bonus, you can do it again to get it back:
Please note that you can still access the children:
"Misty"
You can also use the start or the end position as a range selector:
Array selection
Please note that this is basically an alias for a full range selection:
Property selection
Multi-selection
Filter
You can also combine a filter with a child selection, a multi-selection and ranges at the same time:
Please note that you can combine filters to achieve the same result:
Flattening arrays
Special characters
1337
"yeah!"
"yup, valid too!"
💻 Shell integration
How to save the output
How to read from stdin
|
Available flags 🤖
Help
Version
Inlining the JSON output
🍿 Library
This crate is both a binary (the CLI tool) and a library that can be directly used https://docs.rs/crate/jql/.