Context
YAML dumping and presentation can omit or include values according to application policy. PowerShell users often need to omit nulls or defaults, suppress aliases for consumer compatibility, or emit explicit tags for clarity.
Official YAML 1.2.2 references:
Current State
The emitter serializes supported values deterministically and uses anchors/aliases for repeated acyclic collection references. There are no public options for omitting null/default values, suppressing aliases, or forcing explicit tag emission.
Objective
Add explicit value-policy controls for emission while preventing silent loss unless the caller requested that policy.
PowerShell Design Considerations
- Value policy options should be explicit switches or validated parameters with clear semantics.
- Parameter sets should prevent incompatible combinations where one policy makes another meaningless or unsafe.
- Omission should work naturally for rich PowerShell objects, dictionaries, and pipeline records without depending on implementation-specific object internals.
- Alias suppression should be safe: if suppressing aliases would misrepresent shared or cyclic graphs, it must fail or require a clearly documented policy.
Tasks
Benefits
- Supports common configuration-file emission patterns.
- Makes loss-inducing output policies explicit and testable.
- Improves interoperability with consumers that cannot handle YAML aliases or implicit tags.
Acceptance Criteria
Related
- Spec folder:
spec/Emission-Value-Policy.md
Context
YAML dumping and presentation can omit or include values according to application policy. PowerShell users often need to omit nulls or defaults, suppress aliases for consumer compatibility, or emit explicit tags for clarity.
Official YAML 1.2.2 references:
spec/Emission-Value-Policy.mdCurrent State
The emitter serializes supported values deterministically and uses anchors/aliases for repeated acyclic collection references. There are no public options for omitting null/default values, suppressing aliases, or forcing explicit tag emission.
Objective
Add explicit value-policy controls for emission while preventing silent loss unless the caller requested that policy.
PowerShell Design Considerations
Tasks
Benefits
Acceptance Criteria
Related
spec/Emission-Value-Policy.md