4 ms·
I started using yq over jq. Any significant differences?
by rad_gruchalski 3y ago
I started using yq over jq. Any significant differences?
- MrDrMcCoy 3y agoWhich yq? I prefer https://github.com/mikefarah/yq https://github.com/mikefarah/yq to https://github.com/kislyuk/yq https://github.com/kislyuk/yq.
- Yasuraka 3y agoI 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
- bbkane 3y agoI'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 https://github.com/bbkane/git-xargs-tasks
- rad_gruchalski 3y agoThe former: https://gruchalski.com/posts/2023-07-10-yq-the-yaml-power-tool/ https://gruchalski.com/posts/2023-07-10-yq-the-yaml-power-to....
- a-nikolaev 3y agojq 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 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.