sha256 b47da42138538e87768cea91caf993b0ca46840276865ed400bfbe90fdf059a0
first: &x [1, 2]
second: &x [1, 2]
kept:
nested: 1
list:
- a
- b
also: |
literal
content
*x : keyed
| grammar | valid, vouched for up to construct |
| anchor/alias-as-key | accept from compose on, 7.1: an alias is a node, and a node may be a mapping key |
| anchor/redefined | accept from compose on, 3.2.2.2: an anchor name may be reused, and the alias takes the most recent |
| key/not-a-scalar | open from construct on: each parser's stance decides |
| features | none |
| meaning (none stated) | |
go-yaml yaml.v3
refuse by the loader
libfyaml
accept, then the loader refuses past parse
perlref yamlstar
accept
yamlstar
{"[1 2]":"keyed","also":"literal\ncontent\n","first":[1,2],"kept":{"list":["a","b"],"nested":1},"second":[1,2]}
No source answered.
| parser | verdict | value | round trip | reason | message |
|---|---|---|---|---|---|
| perlref | accepted accept | n/i | n/i | ||
| libfyaml | accepted refuse by the loader | not scored | n/i | TypeError: unhashable type: 'sequence' | |
| yamlstar | accepted accept | not scored | n/i | ||
| yaml.v3 | rejected, explained refuse by the loader | not scored | refused | collection-key: yaml.v3 decodes a mapping into a Go map, and a Go map cannot take a sequence or a mapping as a key: "? [1, 2]" rejects the document | yaml.v3: yaml: invalid map key: []interface {}{1, 2} |
| go-yaml | rejected, as declared refuse by the loader | not scored | refused | key/not-a-scalar: go-yaml refuses this on purpose | [11:1] a sequence cannot be a JSON key |
Corpus compact, 28279 cases, yamlcorpus/48. Run 2026-11-26 22:12 UTC, 23m30s.