heh, wait until one discovers that gojq https://github.com/itchyny/gojq#difference-to-jq > accepts yaml input; so, if you happen to have a bunch of _almost_ structured data then some light sprinkling can turn it into yaml and then you're back in the loving embrace of the jq transformation/mutation language :heart: $ cat some-vendor-nonsense.txt product id: 5 price: 3.14 product id: 6 price: 6.66 $ sed "s/^/ /; s/^ pr…
To a Man with `Jq`, Everything Looks Like JSON
11–14 of 14 posts
Re: To a Man with `Jq`, Everything Looks Like JSON
#12heh, wait until one discovers that gojq https://github.com/itchyny/gojq#difference-to-jq > accepts yaml input; so, if you happen to have a bunch of _almost_ structured data then some light sprinkling can turn it into yaml and then you're back in the loving embrace of the jq transformation/mutation language :heart: $ cat some-vendor-nonsense.txt product id: 5 price: 3.14 product id: 6 price: 6.66 $ sed "s/^/ /; s/^ pr…
Did someone say let's represent structured data as json? a bit of shameless plug: https://github.com/wader/fq :) It's using a fork of gojq btw!
Re: To a Man with `Jq`, Everything Looks Like JSON
#13Earlier quoted context omitted.
Did someone say let's represent structured data as json? a bit of shameless plug: https://github.com/wader/fq :) It's using a fork of gojq btw!
Oh, I didn't know that; how cool! Have you asked itchyny about their interest in upstreaming the changes https://github.com/itchyny/gojq/compare/main...wader:gojq:fq >? they don't look completely out of alignment with gojq and it would make reasoning about "gojq version what?" in fq easier and the inverse merge of theirs versus your fork seems to have a substantial changelog entry https://github.com/wader/gojq/compar…
Hmm weird list of changes for https://github.com/wader/gojq/compare/fq...itchyny:gojq:main but i guess it is because i haven't kept my main branch in sync. The fq branch should be based on latest gojq/main as of now. I usually try to rebase as quick as possible.
Let me know if you have any other questions or want to help out! maybe email etc as i usually don't check HN comments replies that often :)