jqr

Crates.iojqr
lib.rsjqr
version0.1.1
created_at2025-12-17 07:40:05.602924+00
updated_at2025-12-17 09:25:49.054351+00
descriptionA jq implementation in Rust
homepage
repositoryhttps://github.com/EvanL1/jqr
max_upload_size
id1989508
size153,750
(EvanL1)

documentation

README

jqr

A jq implementation in Rust.

Installation

curl -fsSL https://raw.githubusercontent.com/EvanL1/jqr/master/install.sh | sh

Or build from source:

cargo install --path .

Usage

echo '{"name": "Alice", "age": 30}' | jqr '.name'
# "Alice"

echo '[1, 2, 3]' | jqr 'map(. * 2)'
# [2, 4, 6]

echo '"hello world"' | jqr 'gsub("world"; "jqr")'
# "hello jqr"

Supported Features

  • Basic: ., .foo, .[0], .[], |, ,
  • Operators: +, -, *, /, %, ==, !=, <, >, and, or, not, //
  • Constructors: [], {}
  • Conditionals: if-then-else, try-catch
  • Variables: as $x, $x
  • Functions: def f: ...;
  • Builtins: map, select, keys, values, length, type, sort, unique, group_by, flatten, reverse, contains, split, join, to_entries, from_entries, range, reduce, recurse, add, min, max, floor, ceil, round, sqrt, etc.
  • Regex: test, match, capture, scan, sub, gsub, splits

License

MIT

Commit count: 0

cargo fmt