3 ms·
At least jaq[1] gojq[2], and jp[3] (this last of which is jmespath rather than the jq query language) [1]: https://github.com/01mf02/jaq https://github.com/01m
by llimllib 4y ago
At least jaq[1] gojq[2], and jp[3] (this last of which is jmespath rather than the jq query language)
[1]: https://github.com/01mf02/jaq https://github.com/01mf02/jaq
[2]: https://github.com/itchyny/gojq https://github.com/itchyny/gojq
[3]: https://github.com/jmespath/jp https://github.com/jmespath/jp
- mdaniel 4y agoI especially love gojq thanks to this change: $ echo '{"alpha":"beta"}' | jq -r '"hello \(.alpha\)"' jq: error: syntax error, unexpected INVALID_CHARACTER (Unix shell quoting issues?) at <top-level>, line 1: "hello \(.alpha\)" jq: 1 compile error $ echo '{"alpha":"beta"}' | gojq -r '"hello \(.alpha\)"' gojq: invalid query: "hello \(.alpha\)" "hello \(.alpha\)" ^ unexpected token "\\" because (a) muscle memory (b) sure, it's easy to spot that mistake in an 18 character expression, but for bigger ones, getouttahere
- gregmac 4y agoThere's a particularly complicated system I built a few years ago that heavily leaned on jq for configuring some backend systems. It had lots of variables piped in and so that particular error was common. From your snippet, I'm pretty sure gojq would have saved me many hours of debugging.
- raverbashing 4y agoYeah the ergonomy and error messaging of jq is complicated I'm not a big fan of the language, but it works
- tux2bsd 4y agojp --help "It's complicated, you know"