3 ms·
Turns out I can cross out a todo item off my list, because I wanted to make exactly the same thing. Now, to find a query tool with a saner language than Jq...
by aasasd 5y ago
Turns out I can cross out a todo item off my list, because I wanted to make exactly the same thing.
Now, to find a query tool with a saner language than Jq...
- ZeroGravitas 5y agoWhat kind of thing are you trying to do? jq can get pretty deep but for most things in this area I'm not sure how it could improve upon, but would be interested in hearing alternatives. https://github.com/fiatjaf/jiq https://github.com/fiatjaf/jiq Is a realtime feedback wrapper which I find useful when crafting one-off command line uses for jq and it starts getting crazy.
- aasasd 5y agoStepping just a little beyond regular ‘loop and filter’ is already difficult without consulting the manual each time — being exacerbated by the impossibility of finding those things in the manual without skimming through most of it. Making an ‘if’ for variations in the input structure is easily a twenty-minute job. Outside of the basic features, Jq's syntax is increasingly arcane and unintuitive—maybe those working with it daily do remember the ‘advanced’ stuff, but I don't. I actually collected a sizable list of alternatives to Jq: https://github.com/TomConlin/json2xpath https://github.com/TomConlin/json2xpath https://github.com/antonmedv/fx https://github.com/antonmedv/fx https://github.com/simeji/jid https://github.com/simeji/jid https://github.com/jmespath/jp https://github.com/jmespath/jp https://jsonnet.org https://jsonnet.org https://github.com/borkdude/jet https://github.com/borkdude/jet https://github.com/jzelinskie/faq https://github.com/jzelinskie/faq https://github.com/dflemstr/rq https://github.com/dflemstr/rq https://github.com/mgdm/htmlq https://github.com/mgdm/htmlq And there's someone else's list of stuff around Jq: https://github.com/fiatjaf/awesome-jq https://github.com/fiatjaf/awesome-jq However, personally I think that next time I might instead fire up Hy, and use the regular syntax with the functional approach for any convoluted processing I come up with. Last time I mentioned this, another HNer made a Jq-like tool with Lisp-like syntax: https://github.com/cube2222/jql https://github.com/cube2222/jql (from https://news.ycombinator.com/item?id=21981158 https://news.ycombinator.com/item?id=21981158).
- kbrazil 5y agoIf you like python you might check out jello[0]. I basically wrote it to give you the power and simplicity of python without the boiler plate in a jq-like form-factor. Jello also allows you to use dot-notation instead of dict bracket notation, so it does make things easier on the command line. Also, there is jellex[1], which is a TUI wrapper around jello that can help you build your queries. [0] https://github.com/kellyjonbrazil/jello https://github.com/kellyjonbrazil/jello [1] https://github.com/kellyjonbrazil/jellex https://github.com/kellyjonbrazil/jellex
- pdimitar 5y agoHave you checked these? - https://github.com/antonmedv/fx https://github.com/antonmedv/fx - https://github.com/antonmedv/gofx https://github.com/antonmedv/gofx
- kbrazil 5y agoNew parser contributions for JC are always welcome!