← 返回命令列表

Linux command

jql 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Query a top-level field

cat [data.json] | jql '"name"'

Extract nested field

cat [data.json] | jql '"users".[0]."name"'

Select multiple fields

cat [data.json] | jql '"name" "age"'

Raw string output

cat [data.json] | jql -r '"name"'

Read from file

jql '"name"' [data.json]

说明

jql is a JSON query language CLI tool written in Rust. It provides a simple syntax for extracting and manipulating JSON data. Key selectors must be double-quoted to be JSON-compliant. The tool focuses on simplicity over jq's complexity. It supports dot notation for nesting, array indexing with ranges, flattening with .., and multiple selectors in a single query. Input is read from stdin or a file argument.

参数

-r, --raw-output
Output raw strings without JSON double-quotes.
-s, --stream
Read a stream of JSON lines (one JSON object per line).
-h, --help
Display help information.
-V, --version
Display version information.

FAQ

What is the jql command used for?

jql is a JSON query language CLI tool written in Rust. It provides a simple syntax for extracting and manipulating JSON data. Key selectors must be double-quoted to be JSON-compliant. The tool focuses on simplicity over jq's complexity. It supports dot notation for nesting, array indexing with ranges, flattening with .., and multiple selectors in a single query. Input is read from stdin or a file argument.

How do I run a basic jql example?

Run `cat [data.json] | jql '"name"'` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r, --raw-output do in jql?

Output raw strings without JSON double-quotes.