What does HackerNews think of jet?

CLI to transform between JSON, EDN and Transit, powered with a minimal query language.

Language: Clojure

#15 in Clojure
#17 in JSON
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

If you're used to S-expressions/know a bit of Clojure, `jet` is a similar tool that not only allows you to convert between JSON <> EDN, but also has a tiny query language built-in, that is just normal Clojure functions.

Clojure really excels at data querying/manipulation, so `jet` is very ergonomic to use.

One example:

    $ echo '{"anApple": 1}' | jet -i json -k '#(-> % csk/->kebab-case keyword)' -o edn
    {:an-apple 1}
Since starting to use jet, I haven't found anything jq could do that jet couldn't also do but with the additional feature of actually being able to read what I've done with it days later.

https://github.com/borkdude/jet

For me, transforming JSON on the command line was a pain, another DSL to learn. Now, I can just use Babashka/ Clojure + one or two functions from Cheshire https://github.com/dakrone/cheshire where I need to. If I needed a standalone tool, I would perhaps reach for https://github.com/borkdude/jet by the same author, Michiel Borkent, as Babashka or use jq that everybody else would find more familiar.
Examples of Clojure projects that compile to native:

- babashka (https://github.com/babashka/babashka)

- clj-kondo (https://github.com/clj-kondo/clj-kondo)

- jet (https://github.com/borkdude/jet)

SCI (https://github.com/babashka/sci) is a Clojure interpreter that allows you to evaluate Clojure code even inside of the final native binary and is used in all of the above projects.

Feel free to bug me with questions in the graalvm channel on Clojurians Slack.