jq icon indicating copy to clipboard operation
jq copied to clipboard

Docs: Suggest yq for manipulating YAML data

Open mcandre opened this issue 9 years ago • 7 comments

jq is awesome for grokking JSON data! Could the documentation include a link to yq for handling YAML data?

mcandre avatar Aug 01 '16 16:08 mcandre

I would suggest linking to https://github.com/kislyuk/yq instead.

kislyuk avatar Dec 27 '17 02:12 kislyuk

https://github.com/kislyuk/yq has been added to the answer regarding YAML on the jq FAQ.

pkoppstein avatar Dec 27 '17 03:12 pkoppstein

I just released yjq with similar functionality. It's written in Go and the release page provides binaries for all major os/arch. It also supports YAML input -> JSON output and JSON input -> YAML output allowing it to be used in jq pipes.

alxarch avatar Feb 01 '19 16:02 alxarch

The https://github.com/mikefarah/yq project is currently leading in stars and deployments, but isn't perfect. Still, it should have a mention. It is far superior to the extremely slow and sometimes buggy Python version.

Is there an issue to adding a sister yq project that could share internal C libraries with jq? That would seem like the ideal strategy going forward in terms of performance and sustainability. Starting with baseline support for only the YAML syntax of JSON would be a start (which is all that most need).

rwxrob avatar Jun 05 '21 14:06 rwxrob

Since json is just a subset of yaml i'd rather just see jq switch internally and be able to take input in either form and be able to set a flag to output in yaml. It frankly kills me every day when i have to send some yaml through something like yaml2json just so i can manipulate it in jq and then convert it back on the other side.

Since all these 'competing tools' that are in the same vein have different syntax and flags and features and I don't want to bloat up build/ci containers with them just to work with a slightly different file format.

I'm sure this has been brought up a million times and shot down a million times... but lets make this a million and one.

SleepyBrett avatar Apr 27 '22 17:04 SleepyBrett

Just want to mention that I use gojq now. I only use jq when it is the only thing on the system. I know it is a competing project, but feel it is worth mentioning given the recent comments. I also created y2j and yq 🌳Bonzai command branches.

rwxrob avatar Apr 27 '22 20:04 rwxrob

why aren't you considering to add YAML support on jq? YAML is just a superset of JSON, so just changing the loader to a YAML one everything should work in the same way.

magmax avatar May 16 '22 04:05 magmax

Since #467 is about YAML support of jq and is still open, closing this issue, yq is mentioned in both FAQ and Alternative jq implementations.

itchyny avatar Jun 25 '23 07:06 itchyny