Closed aqemi closed 2 years ago
There are no plans to support anchor round-tripping in yq. Because anchor representations are YAML-specific metadata, they are not easily accommodated in JSON without disrupting the document structure. Anchors and aliases are also difficult to deal with safely in untrusted input, so their use is not recommended.
When using yq to edit yaml files, it deletes anchors and setting it values instead. Example
Running
yq -Y '.' test.yaml
will produce such outputExpected to see original input with anchors.