jq 1.7 Released

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • jq

    Command-line JSON processor

  • This is great, JQ is brilliant.

    I love JQ so much we implemented a subset of JQ in Clojure so that our users could use it to munge/filter data in our product (JVM and browser based Kafka tooling). One of the most fun coding pieces I've done, though I am a bit odd and I love writing grammars (big shoutout to Instaparse!).

    I learned through my implementation that [JQ is a LISP-2](https://github.com/jqlang/jq/wiki/jq-Language-Description#:~....) which surprised me as it didn't feel obvious from the grammar.

  • gron

    Make JSON greppable!

  • And jless [1] and gron [2].

    This is the first I'm hearing of gron, but adding here for completeness sake. Meanwhile, JSON seems to be becoming a standard for CLI tools. Ideal scenario would be if every CLI tool has a --json flag or something similar, so that jc is not needed anymore.

    [1] https://jless.io/

    [2] https://github.com/tomnomnom/gron

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • jello

    CLI tool to filter JSON and JSON Lines data with Python syntax. (Similar to jq)

  • A couple more alternatives:

    https://github.com/kellyjonbrazil/jello

    https://github.com/wwkimball/yamlpath

  • jackson-jq

    jq for Jackson Java JSON Processor

  • So just picking Java https://github.com/eiiches/jackson-jq

    > jackson-jq aims to be a compatible jq implementation. However, not every feature is available; some are intentionally omitted because thay are not relevant as a Java library; some may be incomplete, have bugs or are yet to be implemented.

    Where JMESPath has fully compliant 1st party implementations in Python, Go, Lua, JS, PHP, Ruby, and Rust and fully compliant 3rd party implementations in C++, Java, .NET, Elixer, and TS.

    Having a spec and a test suite means that a all valid JMESPath programs will work and work the same anywhere you use it.

  • jless

    jless is a command-line JSON viewer designed for reading, exploring, and searching through JSON data.

  • And jless [1] and gron [2].

    This is the first I'm hearing of gron, but adding here for completeness sake. Meanwhile, JSON seems to be becoming a standard for CLI tools. Ideal scenario would be if every CLI tool has a --json flag or something similar, so that jc is not needed anymore.

    [1] https://jless.io/

    [2] https://github.com/tomnomnom/gron

  • visidata

    A terminal spreadsheet multitool for discovering and arranging data

  • I also find VisiData is useful for adhoc exploring of JSON data. You can also use it to explore multiple other formats. I find it really helpful, plus it gives that little burst of adrenaline from its responsive TUI, similar to fx and jless mentioned.

    For my toolbox I include jq, gron, miller, VisiData, in addition to classics like sed, awk, and perl.

    - https://github.com/saulpw/visidata

  • dasel

    Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • yq

    Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents (by kislyuk)

  • jmespath.py

    JMESPath is a query language for JSON.

  • I love jq, but I also use JMESPath (especially with AWS CLI), yq (bundled with tomlq and xq as well), and dasel [2]. I also wish hclq [3] wasn't so dead!

    [0]: https://jmespath.org/

  • yamlpath

    YAML/JSON/EYAML/Compatible get/set/merge/validate/scan/convert/diff processors using powerful, intuitive, command-line friendly syntax.

  • A couple more alternatives:

    https://github.com/kellyjonbrazil/jello

    https://github.com/wwkimball/yamlpath

  • miller

    Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON

  • jq and miller[1] are essential parts of my toolbelt, right up there with awk and vim.

    [1]: https://github.com/johnkerl/miller

  • rsl

    reserialise: lossy but versatile conversion between data serialisation formats (by sentriz)

  • on a similar note I wrote little tool to convert from many formats to many formats

    the biggest usecase for me is taking some csv, toml, xml, whatever and converting that to json so I can pipe to jq

    https://github.com/sentriz/rsl

  • jo

    JSON output from a shell

  • In addition to my previous comment about jq-like tools, I want to share a couple other interesting tools, which I use alongside jq are jo [0] and jc [1].

    [0]: https://github.com/jpmens/jo

    [1]: https://github.com/kellyjonbrazil/jc

  • jc

    CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.

  • In addition to my previous comment about jq-like tools, I want to share a couple other interesting tools, which I use alongside jq are jo [0] and jc [1].

    [0]: https://github.com/jpmens/jo

    [1]: https://github.com/kellyjonbrazil/jc

  • nushell

    A new type of shell

  • Yeah agreed, especially now that PowerShell is available cross-platform.

    Nushell[1] also seems like a promising alternative, but I haven’t had a chance to play with it yet.

    [1]: https://www.nushell.sh/

  • Newman

    Newman is a command-line collection runner for Postman

  • libnbd

  • nbdkit

  • fx

    Terminal JSON viewer & processor

  • JSONPath

    A fork of JSONPath from http://goessner.net/articles/JsonPath/ (by JSONPath-Plus)

  • Another great alternative is JSONPath[1] which unfortunately not as widely supported and known despite being brilliant!

    It's inspired by XPath so it's very familiar instead of a complete new DSL. The killer feature imo is the recursive key lookup so you can write `people..address` and it'll find all "address" keys that descend from "people" anywhere in the JSON. It's by far my favorite parsing language for JSON and I wrote an introduction blog on how to use it in JSON dataset parsing [2] :)

    1 - https://github.com/JSONPath-Plus/JSONPath

    2 - https://scrapfly.io/blog/parse-json-jsonpath-python/

  • jq-mode

    Emacs major mode for editing jq queries.

  • Seeing this news today, I decided to give jq another try and ended up discovering jq-mode [1] for emacs. It doesn't just support jq filter file editing, it supports jq in org-mode and something else called 'jq-interactively'. This interactive mode allows you to apply jq interactively on a JSON or YAML (with yq) buffer. The buffer contents become the filtered value when you finish editing the jq filter with a return. This is especially impressive to see in yaml files.

    [1] https://github.com/ljos/jq-mode

  • counsel-jq

    Traverse complex JSON and YAML structures with live feedback

  • Didn’t know this. Thanks for the tip!

    Personally, when I test REST APIs, I use „restclient.el“ all the time which also comes with a great JQ integration („jq-set-var“ for example for deriving request variables from responses). For traversing larger responses I use „counsel-jq“ in a customized JSON mode: https://github.com/200ok-ch/counsel-jq

    But I’ll give the major mode a try, too.

  • restclient.el

    Discontinued HTTP REST client tool for emacs

  • fq

    jq for binary formats - tool, language and decoders for working with binary and text formats

  • I do lots of exploratory work in various structure data, in my case often debugging media filea via https://github.com/wader/fq, which mean doing lots of use-once-queries on the command line or REPL. In those cases jq line-friendly and composable syntax and generators really shine.

  • jet

    CLI to transform between JSON, EDN, YAML and Transit using Clojure (by borkdude)

  • I really like jq, but I think there is at least one nice alternative to it: jet [1].

    It is also a single executable, written in clojure and fast. Among other niceties, you don't have to learn any DSL in this case -- at least not if you already know clojure!

    [1] https://github.com/borkdude/jet

  • gojq

    Pure Go implementation of jq

  • gojq has support for yaml input (via a very annoying argument name) and also has the golang property of "curl binary; chmod; profit": https://github.com/itchyny/gojq#difference-to-jq

    It's error reporting is also clang-vs-gcc level wizardry, and I often use it to get a helpful message instead of "ENOWORKY" from jq (I haven't tried 1.7 yet, so it could be better for all I know)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts