4 ms·
Too bad that jq has such a shitty, convoluted syntax. Could have definitely chosen one of the many alternatives to jq that also worked with JSON but did so in
by pmoriarty 3y ago
Too bad that jq has such a shitty, convoluted syntax.
Could have definitely chosen one of the many alternatives to jq that also worked with JSON but did so in a much clearer and more elegant way.
- hedora 3y agoCan you name an alternative to jq with better syntax?
- dmoura 3y agoI prefer a SQL-like format. It’s not as complete but it cover most of the day-to-day use cases. Take a look at https://github.com/dcmoura/spyql https://github.com/dcmoura/spyql (I am the author). Congrats on fq!
- wwader 3y agoThanks! i actually experimented a bit with an SQL-like interface for while, dump things into sqlite and use that as query engine. Problem usually was that file formats tend to be mix of array and tree structures more then relational and at least standard SQL is not great for that. Maybe some graph-SQL dialect could work?
- benibela 3y agoThere is XPath 3.1
- xp84 3y agoCommenting to follow because I’m curious what alternatives you mean. I thought a lot of people liked jq and I only just finally got around to installing it, so if there’s a much better way I’d like to hear it.
- wwader 3y agoHi author here. Slide 3 from my FOSDEM talks explains my own very subjects reasons for choosing jq https://fosdem.org/2023/schedule/event/bintools_fq/attachments/slides/5660/export/events/attachments/bintools_fq/slides/5660/fq_fosdem_2023.pdf https://fosdem.org/2023/schedule/event/bintools_fq/attachmen... To sum up: Very CLI friendly syntax, generators/backtracking makes working with tree structures very convenient. But now after writing lots of jq i even thing writing multi line programs in jq to be quite nice :) but i can recommend IDE help, see end of slide 17