Hacker News new | ask | show | jobs
by rad_gruchalski 933 days ago
I started using yq over jq. Any significant differences?
2 comments

I prefer the former, single static binary which works great on workstations and CI alike, the latter requires python as well as jq as it's a wrapper
I've been using yq + git-xargs to automate config files in repos (CI/CD, linters, etc). The combo has been spectacular for me.

https://github.com/bbkane/git-xargs-tasks

jq feels like a much more robust tool than yq. I understand that the task of processing YAML is much harder than JSON, but:

- yq changed its syntax between version 3 and 4 to be more like jq (but not quite the same for some reason)

- yq has no if-then-else https://github.com/mikefarah/yq/issues/95 which is a poor design (or omission) in my opinion

So yq works when you need to process YAML, it can even handle comments quite well. Buy for pure JSON processing jq is a better tool.