Context
YAML 1.2.2 offers multiple presentation styles for the same representation graph. The module currently emits a deterministic subset, while users need more control over scalar quoting, flow/block style, sequence indentation, and JSON-compatible output.
Official YAML 1.2.2 references:
Current State
Emission is deterministic and YAML-compatible, but presentation controls are limited. Strings and mapping keys are emitted double-quoted, collections use block style, and JSON-compatible emission is not exposed as a dedicated mode.
Objective
Expose idiomatic PowerShell controls for YAML presentation while keeping deterministic, safe output and preserving current defaults until a deliberate major-version change.
PowerShell Design Considerations
- Use validated parameters for style choices instead of switches that can combine into invalid states.
- Use parameter sets or validation to prevent conflicting presentation modes, especially JSON-compatible output versus YAML-specific style controls.
- Preserve pipeline behavior where multiple input records become a predictable document shape.
- Emit rich, classified errors when a requested presentation cannot represent the input graph.
Tasks
Benefits
- Produces YAML that better matches user and tool expectations.
- Enables JSON-compatible output from the same value model.
- Keeps existing automation stable while allowing explicit presentation choices.
Acceptance Criteria
Related
- Spec folder:
spec/Emission-Presentation.md
Context
YAML 1.2.2 offers multiple presentation styles for the same representation graph. The module currently emits a deterministic subset, while users need more control over scalar quoting, flow/block style, sequence indentation, and JSON-compatible output.
Official YAML 1.2.2 references:
spec/Emission-Presentation.mdCurrent State
Emission is deterministic and YAML-compatible, but presentation controls are limited. Strings and mapping keys are emitted double-quoted, collections use block style, and JSON-compatible emission is not exposed as a dedicated mode.
Objective
Expose idiomatic PowerShell controls for YAML presentation while keeping deterministic, safe output and preserving current defaults until a deliberate major-version change.
PowerShell Design Considerations
Tasks
Benefits
Acceptance Criteria
Related
spec/Emission-Presentation.md