Thanks, expr and gjson are awesome.
Just FYI: I made a tool for my work named jef that combines GJSON and this expr package to filter newline delimited json with.
In my test on a file with 1 million JSON records, that jef tool is about 17 times faster than jq is. And I owe it all to you!
% time jq '.favourite_color="Beige"' < testdata/users_1m.nljson > /dev/null
jq '.favourite_color="Beige"' < testdata/users_1m.nljson > /dev/null 17.57s user 0.30s system 98% cpu 18.065 total
% time ./jef -i testdata/users_1m.nljson -e 'favourite_color == "Beige"' >/dev/null
./jef -i testdata/users_1m.nljson -e 'favourite_color == "Beige"' > /dev/null 1.07s user 0.25s system 100% cpu 1.311 total
So, thanks a lot and keep up the great work! Feel free to close this after reading.
Thanks for the kind words.
Your jef tool sounds great!
I'm rewriting an open source version of it, albeit slowly right now, for the qrochet project I am doing with my daughter. https://github.com/qrochet/qrochet/tree/main/cmd/jef
Nice! I'll keep an eye out for it.