YAML 1.2.2 lets nodes be explicitly typed via tags. Currently any !/!! prefix is treated as plain text.
Request
Parse and honour:
!!str, !!int, !!float, !!bool, !!null β force scalar resolution
!!seq, !!map β force collection kind (mostly informational since kind is already implied)
!!set β mapping where every value is null, exposed as a hashset-like structure
!!omap β sequence of single-pair mappings, exposed as [ordered] hashtable
- Verbatim tags
!<tag:...> β accept and ignore (or surface as metadata)
- Local tags
!foo and %TAG directives β accept; behavior TBD
Spec examples covered
- Example 2.21 β Miscellaneous (typed forms with
!!str)
- Example 2.23 β Various Explicit Tags
- Example 2.24 β Global Tags
- Example 2.25 β
!!set
- Example 2.26 β
!!omap
Open questions
- Custom tag handlers (extension API) β likely out of scope for v1.
- Should unknown tags warn or silently fall through to default scalar/collection resolution? Recommend silent fall-through with a debug message.
YAML 1.2.2 lets nodes be explicitly typed via tags. Currently any
!/!!prefix is treated as plain text.Request
Parse and honour:
!!str,!!int,!!float,!!bool,!!nullβ force scalar resolution!!seq,!!mapβ force collection kind (mostly informational since kind is already implied)!!setβ mapping where every value is null, exposed as a hashset-like structure!!omapβ sequence of single-pair mappings, exposed as[ordered]hashtable!<tag:...>β accept and ignore (or surface as metadata)!fooand%TAGdirectives β accept; behavior TBDSpec examples covered
!!str)!!set!!omapOpen questions