Unified query language for various commonly used data representation formats (JSON, XML, YAML, etc.)
Install Go and run go run cmd/uniquery/main.go -h
to get information about available flags and their meaning.
Please see query examples for rough query syntax explanation.
Format | Support | Notes |
---|---|---|
JSON | ✔️ Yes | Works according to tests. |
YAML | ❓ Partial | Not very well tested yet. |
XML | ❌ No | More complicated than JSON and YAML. |
CSV | ❌ No | Support is not currently planned. |
Consider the following JSON file users.json
, which maps real names to nicknames.
{
"alice80": "Alice Yang",
"bob12": "Bob Jacobs",
"tank": "Charlie Peterson"
}
Query | Result |
---|---|
empty query | root element / whole data structure |
alice80 |
"Alice Yang" |
tank |
"Charlie Peterson" |
* |
["Alice Yang", "Bob Jacobs", "Charlie Peterson"] |
alice80. |
root element (parent of alice80 ) |