Why
Anchors and aliases let a YAML document reference the same node multiple times without duplicating it. Without support, documents that rely on this — common in shared configuration templates — cannot be parsed correctly.
What
ConvertFrom-Yaml should resolve aliases to their anchored node, for example:
defaults: &defaults
timeout: 30
retries: 3
production:
<<: *defaults
host: prod.example.com
ConvertTo-Yaml does not need to emit anchors automatically — the spec allows but does not require it. Round-tripping anchors is out of scope for v1.
Spec examples covered
- Example 2.10 — Node "Sammy Sosa" appears twice
- Parts of Example 2.27 (Invoice)
Why
Anchors and aliases let a YAML document reference the same node multiple times without duplicating it. Without support, documents that rely on this — common in shared configuration templates — cannot be parsed correctly.
What
ConvertFrom-Yamlshould resolve aliases to their anchored node, for example:ConvertTo-Yamldoes not need to emit anchors automatically — the spec allows but does not require it. Round-tripping anchors is out of scope for v1.Spec examples covered