jql

Dev tools

json query tool

SHOW HN2020

jql

Easier jq Alternative with a Lispy Syntax Written in Go

github.com

#jq alternative#json query#lisp syntax#json command line

217points
90comments
#243of 3,028 in 2020
Top 9%of 2020 by points

How HN took it

MixedNo clear lean

6 positive, 10 neutral or asking, 0 mixed, 10 critical, out of 26 comments about the project. Thread score +0.02.

Design: 1 for, 8 againstIdea: 3 for, 0 againstDocs: 1 for, 2 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Simpler and more readable than jq

    From 3 comments
    • I'm super excited to sink my teeth into this. I usually have to use jq in intense bursts and no matter what i end up back in the manual because it just get's so damn confusing.…
      spikepuppet on HN
    • Good Lawd'amercy. jq and lisp? In all seriousness, thank you for writing this. I've had trouble wrapping my small brain around some of jq's more advanced syntax, so being able to…
      bloopernova on HN
    • Can you find many lisps or even any lisps that evaluate like that? A familiar syntax that actually works different from any lisp in existence may be more hindrance than help.
      michaelmrose on HN
  • Structure of queries matches JSON structure

    From 2 comments
    • I suppose to each their own. I like how the query matches the json structure well.
      cube2222 on HN
    • This looks very readable and matches the structure of the json too. To me it's basically the same readability wise with proper indentation. Though with deeply nested data and a…
      cube2222 on HN

Objections

  • Lisp-style syntax is confusing; the examples read as non-Lispy

    From 2 comments
    • I love the idea of a Lispy version of jq, but as a Lisper, the examples feel bewildering to me. The fact that (elem) takes an optional second argument, whose default value is…
      useragent86 on HN
    • Regarding CPS: I think that expecting users to write queries in CPS is going to be very limiting. It's missing a big opportunity to use simple funcall and/or pipeline syntax,…
      useragent86 on HN
  • Parentheses are hard to balance in a shell

    From 1 comment
    • I tend end to struggle with this sort of lispy syntax as I use a regular shell (rather than one in emacs) which makes balancing parens hard, and the syntax is otherwise verbose.…
      dan-robertson on HN

Requests

  • Automatically add closing parentheses

    From 2 comments
    • I tend end to struggle with this sort of lispy syntax as I use a regular shell (rather than one in emacs) which makes balancing parens hard, and the syntax is otherwise verbose.…
      dan-robertson on HN
    • Very glad to hear that! Feel free to open issues if you have problems or feature requests! There's an issue for at least adding trailing and starting parentheses automatically,…
      cube2222 on HN
  • Interactive mode or live preview

    From 2 comments
    • Nice project. I'm a heavy jq user and still find myself regularly tinkering around with queries on https://jqplay.org. It would be nice if there were a similar page for jql, even…
      onionisafruit on HN
    • I tend end to struggle with this sort of lispy syntax as I use a regular shell (rather than one in emacs) which makes balancing parens hard, and the syntax is otherwise verbose.…
      dan-robertson on HN

Questions

  • How does elem work when used with a function in place of a key

    From 2 comments
    • Looks good but there seems to be a missing explanation gap between switching from `(elem "countries")` and dropping the `elem`s to just `("countries")`. Why is `elem` able to be…
      jsd1982 on HN
    • I love the idea of a Lispy version of jq, but as a Lisper, the examples feel bewildering to me. The fact that (elem) takes an optional second argument, whose default value is…
      useragent86 on HN

Alternatives named

  • jsonnet

    From 1 comment
    • So I guess we all know https://jsonnet.org, right? It's advertised as a data templating language. Interestingly enough, you can also use it as a querying tool. The first four…
      EdSchouten on HN
  • fx

    From 1 comment
    • I have used fx for a few days and enjoyed it. https://github.com/antonmedv/fx Highlights - interactive mode - Use full power of JavaScript. $ curl ... | fx '.filter(x =>…
      pololee on HN
  • jmespath

    From 1 comment
    • To be frank the ascendance of jq has always seemed weird to me. There are many alternatives that felt much more natural, as this thread demonstrates. JSONata remains pretty…
      cookiecaper on HN
  • JSONata

    From 1 comment
    • To be frank the ascendance of jq has always seemed weird to me. There are many alternatives that felt much more natural, as this thread demonstrates. JSONata remains pretty…
      cookiecaper on HN
  • rq

    From 1 comment
    • There is more universal alternative to jq that supports also protobuf, msgpack, cbor, etc - rq[1]. [1] https://github.com/dflemstr/rq
      xvilka on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/21981158)