News for hackers. Stuff that matters.
Re:PyPy's New JSON Parser by e12e on Tuesday October 08, 2019 @03:38PM (#21196287)
A question - do know of any good resources for jq? I haven't quite been "angry enough" to use jq much beyond using it for formatting json - but that's also partly because I can't seem to quite grasp the syntax.

It isn't quite "awk-ish", not quite cut/join/sort/uniq. But also not quite graphql? Which I suppose would be the "natural" language for a json-query tool?

I feel like I'm missing a piece - and missing out...

Re:PyPy's New JSON Parser by chucky_z on Wednesday October 09, 2019 @12:43AM (#21200098)
The manual is pretty dang good, tbh.

https://stedolan.github.io/jq/manual/

Re:PyPy's New JSON Parser by e12e on Wednesday October 09, 2019 @02:26AM (#21200604)
I agree that it is clear, but I still struggle to figure out (by myself) how to do (in an awk sense) simple things like:

Filter out empty or null values:

https://stackoverflow.com/questions/39500608/remove-all-null...

I seem to either end up with unwieldy, long/verbose solutions - or shorter ones that does not work :)

Re:PyPy's New JSON Parser by chucky_z on Thursday October 10, 2019 @10:48PM (#21221111)
Oh wow, that's terrible!

I tend to get 90% of the way with jq and then awk/sed/grep my way to the desired result (jq -r).