Context
YAML 1.2.2 recommends failsafe, JSON, and core schemas. Schema choice controls how plain scalars resolve to tags and therefore which native values users receive.
Official YAML 1.2.2 references:
Current State
The module exposes the YAML 1.2 core schema as the default behavior. There is no public schema-selection parameter for failsafe or JSON schema behavior.
Objective
Let callers choose core, JSON, or failsafe schema behavior for plain scalar resolution while preserving the current core schema default.
PowerShell Design Considerations
- Use a discoverable
-Schema parameter with validated values rather than separate cmdlets.
- Keep parameter symmetry between conversion and file import, and apply schema-aware validation to test/format/merge surfaces.
- Preserve rich object behavior by resolving scalars before projection, not after PowerShell object construction.
- Consider parameter-set interactions with future typed projection and resolver parameters so schema selection remains composable.
Tasks
Benefits
- Lets strict JSON-compatible YAML users reject non-JSON scalar forms.
- Lets configuration authors preserve version-like and identifier-like values as strings.
- Keeps default behavior stable for existing users.
Acceptance Criteria
Related
- Spec folder:
spec/Schema-Selection.md
Context
YAML 1.2.2 recommends failsafe, JSON, and core schemas. Schema choice controls how plain scalars resolve to tags and therefore which native values users receive.
Official YAML 1.2.2 references:
spec/Schema-Selection.mdCurrent State
The module exposes the YAML 1.2 core schema as the default behavior. There is no public schema-selection parameter for failsafe or JSON schema behavior.
Objective
Let callers choose core, JSON, or failsafe schema behavior for plain scalar resolution while preserving the current core schema default.
PowerShell Design Considerations
-Schemaparameter with validated values rather than separate cmdlets.Tasks
Benefits
Acceptance Criteria
-Schema Corematches current default behavior.-Schema Failsafereturns plain scalar values as strings.-Schema JSONaccepts JSON scalar forms and rejects core-only forms.Test-Yaml,Format-Yaml, andMerge-Yamlhonor schema selection where scalar resolution matters.Related
spec/Schema-Selection.md