To A Man With `jq`, Everything Looks Like JSON

https://ishan.page/blog/2023-12-07-jq-hammer-nails/

71 points · 8 comments · view on lemmy.world

8 Comments

joyjoy@lemm.ee · 14 pts · 2y (5 replies)

For everything else, there's yq, xq, and tomlq.

snowe@programming.dev · 3 pts · 2y (3 replies)

I use all these tools so little that I have to relearn them every single time, making them much less useful to me than they would be otherwise.

kogasa@programming.dev · 1 pts · 2y (2 replies)

yq is a wrapper around jq iirc and has the same syntax, but it do yaml.

Small disclaimer that i think there may be 2 tools known as yq and this is only true of one of them.

snowe@programming.dev · 2 pts · 2y

I meant tools like jq. I hardly ever use it as it’s hard to use and as a result I forget it making it even harder to use. The same applies to awk, sed, etc. Any tool with a bunch of command line flags and hard to understand arguments and syntax will always be low on my “want to use” list. Ripgrep is a prime example of how to build a command line app that is easy to use every time without trying to remember a billion things.

curiousaur@reddthat.com · -4 pts · 2y

JSON > Yaml

CmdrKeen@lemmy.today · 1 pts · 2y
mrkite@programming.dev · 2 pts · 2y

One of our data providers gives us hundred megabyte json files. Whenever there is a problem with the data they request examples, jq is invaluable in those instances.

superbirra@lemmy.world · -3 pts · 2y

yeah, ls | while read file; do echo blabla $file; done