Context
PowerShell class instances provide a natural rich-object target for YAML configuration. YAML mappings can be bound into typed objects when callers explicitly request that projection.
Official YAML 1.2.2 references:
Current State
The module projects YAML values to PowerShell-native scalar, sequence, object, and dictionary shapes. It does not bind mappings directly to caller-specified classes.
Objective
Add opt-in typed projection that binds YAML mappings into PowerShell classes or supported .NET types while preserving safe default projection.
PowerShell Design Considerations
- Use a clear
-As [type] style parameter and avoid conflict with existing -AsHashtable semantics through parameter sets.
- Support rich PowerShell class construction and property binding without invoking arbitrary YAML-driven types.
- Provide predictable conversion rules for scalars, arrays, dictionaries, nullable values, enums, and nested classes.
- Errors should identify missing required data, unknown members, conversion failures, and constructor limitations.
Tasks
Benefits
- Lets users consume YAML directly as domain-specific PowerShell objects.
- Keeps default projection simple and safe.
- Reduces boilerplate conversion code in scripts and modules.
Acceptance Criteria
Related
- Spec folder:
spec/Typed-Projection.md
Context
PowerShell class instances provide a natural rich-object target for YAML configuration. YAML mappings can be bound into typed objects when callers explicitly request that projection.
Official YAML 1.2.2 references:
spec/Typed-Projection.mdCurrent State
The module projects YAML values to PowerShell-native scalar, sequence, object, and dictionary shapes. It does not bind mappings directly to caller-specified classes.
Objective
Add opt-in typed projection that binds YAML mappings into PowerShell classes or supported .NET types while preserving safe default projection.
PowerShell Design Considerations
-As [type]style parameter and avoid conflict with existing-AsHashtablesemantics through parameter sets.Tasks
Benefits
Acceptance Criteria
Related
spec/Typed-Projection.md