jaq is a jq clone with focus on correctness, speed, and simplicity.
The most outstanding change in jaq 3.0 is its multi-format support, allowing you to read and write several data formats such as YAML, CBOR, TOML, XML, CSV, TSV, and of course JSON. That means that among others, jaq can convert data from one format into another, while transforming data with a jq filter. This effectively makes it into a "Pandoc for structured data".
Achieving this has been the main focus of the NLnet-founded "Polyglot jaq" project, which has been successfully finished. A huge thanks to NLnet for supporting jaq and, more generally, free software!
Other large user-facing changes include:
- Manual: jaq now has a full jq and jaq reference manual. This was a monumental effort into which I poured a lot of love, and I hope that you enjoy reading it as much as I enjoyed putting easter eggs into it. Bonus: You also get a man page. (For package maintainers: Man page build instructions can be found in
docs/README.md.) - Byte strings: You can now read strings that contain arbitrary contents, including invalid UTF-8 sequences. (When a string is read from a file, this takes only constant time, thanks to memory mapping.) You can then mark these strings as byte strings via
tobytes, allowing you to index/slice them in constant time. This allows you to process arbitrary binary data efficiently with jaq --- as proof of concept, I implemented a little TAR decoder. - Arbitrary values as object keys: Where jq supports only strings as object keys, jaq supports arbitrary values as object keys.
- Compatibility improvements: Although this release adds many new features to jaq that do not exist in jq, this release still increases compatibility with jq. For example, jaq now supports
path/1and many other path-related filters.
API:
- New
jaq-allcrate for easier "batteries-included" jaq usage - Passing arbitrary data to native filters
- Optional thread-safe
jaq_json::Valwhen enabling thesyncfeature, allowing for multithreaded usage of values, e.g. running multiple filters in parallel on the same value
- Support CSV/TSV, initiated by @jack-faller #405
- Speed up
lengthof text strings #417 - Update to codesnake 0.3 #413
- Store
TermIdas reference inExn#411
See the release notes for alpha, beta, and gamma for more details on all changes since jaq 2.3.