A YAML stream may contain multiple documents separated by --- and optionally terminated by .... The parser currently tolerates these markers but only returns the first document.
Request
ConvertFrom-Yaml should return one object per document when the input contains multiple documents:
---
time: 20:03:20
player: Sammy Sosa
action: strike
...
---
time: 20:03:47
player: Sammy Sosa
action: grand slam
...
Default: emit each document as a separate pipeline object (consistent with PowerShell pipeline conventions). Consider an -AsArray or single-document-strict switch for predictable scripting.
ConvertTo-Yaml should emit a multi-document stream when given an array with an explicit opt-in (e.g. -AsStream or similar — design TBD).
Spec examples covered
- Example 2.7 — Two Documents in a Stream
- Example 2.8 — Play by Play Feed
- Example 2.28 — Log File
Open questions
- Pipeline shape: emit N objects vs. wrap in array? Recommend N objects with
-NoEnumerate to wrap.
- Backward compatibility with current single-doc behavior — needs a deliberate decision before implementation.
A YAML stream may contain multiple documents separated by
---and optionally terminated by.... The parser currently tolerates these markers but only returns the first document.Request
ConvertFrom-Yamlshould return one object per document when the input contains multiple documents:Default: emit each document as a separate pipeline object (consistent with PowerShell pipeline conventions). Consider an
-AsArrayor single-document-strict switch for predictable scripting.ConvertTo-Yamlshould emit a multi-document stream when given an array with an explicit opt-in (e.g.-AsStreamor similar — design TBD).Spec examples covered
Open questions
-NoEnumerateto wrap.