YAML consensus

Each of the 5 YAML parsers compared below reads every document of our compact corpus (28279 documents).

The report scores each parser against the corpus and compares the parsers with each other. Hover over a column heading to see what it counts.

Corpus facts sheet

tiercompact
documents28279: 19519 valid, 8760 invalid
with a stated value2864
carrying a tag9412, under 66 tags
size3.0 MiB
grammarYAML 1.2
corpus generatoryamlcorpus/48
conformance-suites commitv0.0.4
corpus digestsha256:a0bb2e920a6cd07b5ed467f6cc561a61f096d34a8cdaae40aa572b17ebebf601

Tested parsers

idimplementationversiontime over the corpusthis run
perlrefYAML 1.2 reference parser (Perl), yaml/yaml-reference-parsermain d58347b997eea4d7e5ba33b36871535dad6db0814552.4 snot recorded
libfyamllibfyaml (C): fy-tool for events, the Python binding for valuesbinding 1.0.0rc2, 1.0.0-rc21135.7 snot recorded
yamlstarYAMLStar (Clojure), its own reference parseryaml v0.1.28532.7 snot recorded
yaml.v3go.yaml.in/yaml/v3 (Go)go.yaml.in/yaml/v3 v3.0.62.4 snot recorded
go-yamlgithub.com/go-openapi/go-yaml (Go)go-openapi/go-yaml: v0.0.0-20261126182158-1aed24577d0052.8 snot recorded

The time over the corpus adds up how long each parser's driver took on each document, from reading it to writing the answer, and leaves out starting the driver. A document the cache answered counts the time of the run that first asked it. The time depends on the language of the driver and on the work it does beyond parsing, such as writing JSON and checking the round trip, so use it to compare runs of one parser more than to compare parsers. "This run" gives what the run that wrote these results cost: the documents it asked, and the wall time with the drivers working side by side.

Each parser has a stance file, which records its positions on features and on known areas of divergence. The columns of the tables below use these words:

Verdict on a YAML document being valid or invalid. Each parser accepts or rejects each of the 28279 documents, and the corpus grammar states which is correct.

A rejection of a valid document, or an acceptance of an invalid one, is split by its reason: a rule the specification settles beyond the grammar, a position the parser declares in its stance file, a known departure the stance file explains, or a tag marking an open question. What is left is a defect in the parser or in the corpus. The table below the counts lists the reasons.

parservalid documents: 19519invalid documents: 8760
acceptedaccepted, against the rulesrejected, settledrejected, as declaredrejected after the parserejected, explainedrejected, taggedrejectedrejectedaccepted, explainedaccepted, taggedacceptederror
perlref1585202870033737075181241010
libfyaml184051240008355338382371070
yamlstar1116118445833614513130872031900
yaml.v31167542542339844210294285222232130
go-yaml15292025464414961410087600000

The parsers do not all give the same verdict on 13929 documents.

Reasons

One group for each cell of the table above, with the cell's count and the reasons behind it: a settled rule, a declared stand, a departure from the parser's stance file, an open tag, or nothing at all.

Click a count above to jump to its group. Each case count links to a page listing the first cases, and its tooltip shows the first document.

parsercolumncountreasonkindcases
perlrefaccepted15852key/duplicate: the grammar has no production against a key written twice, and the reference parser implements the grammar alone, so it does not check this settled rule1347
the rest agree with the corpus and need no reason14505
perlrefrejected, settled287tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not216
anchor/alias-undefined: 7.1: an alias refers to the most recent preceding node having the given anchor, and there is none. The parser checks this compose rule at parse69
directive/yaml-repeated: 6.8.1: it is an error to specify more than one YAML directive for the same document. The parser checks this compose rule at parse1
directive/handle-out-of-scope: 6.8.2.2: TAG directives apply to the document that follows them, so a later document has no such handle. The parser checks this compose rule at parse1
perlrefrejected, explained3373lone-cr-break: the parser takes a lone CR as a line break in some places and not in others: "x\r\r", "x\r# c", "!foo\r- a", "\r!" and an empty line written "\n\r" reject the document, where [28] b-break takes a lone CR. Any valid document holding a lone CR is covered, so a defect of another kind in such a document is hiddendefect2697
bom-before-content: the parser takes a byte order mark before "---", a directive, a space or a break, and rejects one right before content or a comment, where [202] l-document-prefix takes it: "\ufeffa: 1" rejects the documentdefect670
json-key-properties-adjacent-value: the parser rejects a quoted key with node properties in a flow mapping when its value follows the ':' with no space: "{!!str "" :x}", "{! 'p':x}" and "{? !!str " ":9}" are rejected, where c-flow-json-node takes the properties and c-ns-flow-map-adjacent-value the value; "{"" :x}" and "{!!str "": x}" are accepteddefect6
perlrefrejected, tagged7encoding/bom: perlref has not ruled on this7
perlrefaccepted, explained1241bytes-not-utf8: the parser does not check that its input is UTF-8leniency893
escape-unchecked: the parser takes a double-quoted escape without checking it: \x with fewer than two hex digits, \u with fewer than four, a letter no escape namesleniency275
bom-anywhere: the parser takes a byte order mark where the grammar allows noneleniency39
yaml-directive-unchecked: the parser does not check the version number of a %YAML directiveleniency27
lone-cr-in-block-scalar: the parser takes a line at column 0 into a top-level block scalar when the lines end in lone CRs, where that line ends the scalar: ">-\r .\r5" is accepted with the value " .\n5", and the same document with LF breaks is rejecteddefect6
explicit-value-compact-key: the parser follows [185] s-l+block-indented to the letter after the ':' of an explicit entry: s-indent(0) and a compact mapping whose key is a lone '?', so "? a\n:?" is accepted. The '-' of a block sequence entry has a lookahead against this, and the ':' has none; the corpus reads the document as invalid, as libfyaml, yaml.v3 and go-yaml dodefect1
perlrefaccepted, invalid1nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus.1
libfyamlaccepted18405key/duplicate: fy-tool writes events without checking for a key written twice, and accepts most documents that write one1573
anchor/alias-across-documents: libfyaml keeps one anchor table for the whole stream on purpose, so an alias may name an anchor of an earlier document. The rule is decided at compose, past the parse fy-tool gives the verdict on1
the rest agree with the corpus and need no reason16831
libfyamlaccepted, against the rules1tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not1
libfyamlrejected, settled240tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not215
directive/yaml-major-version: 6.8.1: a processor must reject a directive whose major version differs from its own. The parser checks this compose rule at parse9
anchor/alias-undefined: 7.1: an alias refers to the most recent preceding node having the given anchor, and there is none. The parser checks this compose rule at parse9
escape/past-unicode: 5.7: \U escapes a 32-bit Unicode character, and no character lies past U+10FFFF. The parser checks this compose rule at parse4
directive/yaml-repeated: 6.8.1: it is an error to specify more than one YAML directive for the same document. The parser checks this compose rule at parse1
directive/tag-handle-repeated: 6.8.2.2: it is an error to specify more than one TAG directive for the same handle in the same document. The parser checks this compose rule at parse1
directive/handle-out-of-scope: 6.8.2.2: TAG directives apply to the document that follows them, so a later document has no such handle. The parser checks this compose rule at parse1
libfyamlrejected, explained835indicator-counted-from-0: fy-tool counts a top-level block scalar's indentation indicator from column 0. The root node has n = -1 ([207] l-bare-document), and [170] sets the content indentation to n+m, so "--- |3" holds its content at 2 spaces, as the column 0 content of example 9.5 needs. After a reserved directive, fy-tool writes the warning "Unsupported directive" first, and the indentation error after itdefect440
tab-after-explicit-key: fy-tool rejects the ':' of an explicit entry whose '?' a tab follows: "?\ta\n: b" is rejected, where s-separate takes the tab before a scalar keydefect239
tab-after-block-entry: fy-tool rejects a tab after a '-' before a block scalar header, "-\t>-", and before some scalars in nested entries, where s-separate takes the tabdefect136
plain-value-continued: fy-tool reads a plain value continued on a more indented line that starts with '?' as a multi-line key: "? a\n: x\n ? b\n: y" is rejected, where s-ns-plain-next-line makes the value "x ? b"defect9
tab-before-node: fy-tool reads a tab at the start of a line as the start of a plain scalar, so a node property, a quoted scalar or a flow collection after it fails, and so does a last line of a tab after a comment: "---\n\t&a1 []" is rejected, where s-separate takes the tabdefect6
block-scalar-at-node-column: fy-tool takes the column of an anchor, or of an indented header, as the indentation of a top-level block scalar, so content at or left of that column ends the document: "&a1 |\nx" and " >-\n x" are rejected, where the root's n = -1 lets the content start at column 0defect5
libfyamlrejected, tagged5encoding/bom: libfyaml has not ruled on this3
indentation/tab-opens-content: fy-tool rejects a tab opening a top-level block scalar's content in a bare document, "|\n\tx" fails with "invalid tab character as indent instead of space", and accepts it after a "---": "--- !!str |\n\tx"2
libfyamlrejected33nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus.33
libfyamlaccepted, explained371control-chars-unchecked: fy-tool takes a control character that c-printable excludes, in a scalar or a comment: "-1 # \x1e1" is acceptedleniency132
tag-shorthand-unchecked: fy-tool reads a tag shorthand up to the next space, and takes characters ns-tag-char excludes: "!!n-1!int -2" is acceptedleniency103
bom-not-first: fy-tool takes a byte order mark after the first byte, where the grammar allows noneleniency97
directives-without-document: fy-tool takes a stream of directives that no "---" follows, where l-directive-document needs one: "%YA" is acceptedleniency24
anchor-against-flow-indicator: fy-tool ends an anchor name at a flow indicator and reads the node right after it, where the grammar needs a separation between the anchor and its node: "&a1{}" is acceptedleniency13
plain-question-mark-before-flow-indicator: fy-tool reads a lone '?' right before ']', '}' or ',' as the plain scalar "?", where [126] ns-plain-first needs an ns-plain-safe character after it and [150] a separation after the '?' indicator: "[?]" is accepted as ["?"]leniency2
libfyamlaccepted, invalid7nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus.7
yamlstaraccepted11161key/duplicate: the loader does not check this settled rule: it keeps the last value of a key written twice, so "a: 1\na: 2" loads as {"a": 2}779
the rest agree with the corpus and need no reason10382
yamlstaraccepted, against the rules18directive/yaml-major-version: 6.8.1: a processor must reject a directive whose major version differs from its own9
key/duplicate-after-resolution: 3.2.1.1: keys are equal when they resolve to the same node, however they are written5
escape/past-unicode: 5.7: \U escapes a 32-bit Unicode character, and no character lies past U+10FFFF3
directive/tag-handle-repeated: 6.8.2.2: it is an error to specify more than one TAG directive for the same handle in the same document1
yamlstarrejected, settled445anchor/alias-undefined: 7.1: an alias refers to the most recent preceding node having the given anchor, and there is none224
tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not216
anchor/alias-forward: 7.1: the anchor must precede the alias, so a forward reference names nothing1
anchor/alias-across-documents: 3.2.2.2: anchor names are local to a document, so an earlier document's anchor is out of scope1
directive/yaml-repeated: 6.8.1: it is an error to specify more than one YAML directive for the same document1
directive/handle-out-of-scope: 6.8.2.2: TAG directives apply to the document that follows them, so a later document has no such handle1
escape/past-unicode: 5.7: \U escapes a 32-bit Unicode character, and no character lies past U+10FFFF1
yamlstarrejected, as declared8anchor/cyclic-meaning: the loader knows an anchor only once its node ends, so an alias inside that node names nothing: "a: &x [ *x ]" rejects the document with "Unknown anchor: x"4
merge/into-non-mapping: the loader rejects a merge key whose value is not a mapping or a sequence of mappings2
merge/key-alone: yamlstar refuses this on purpose2
yamlstarrejected after the parse3361the loader rejects a document the corpus vouches for only up to parse3361
yamlstarrejected, explained4513lone-cr-break: the reference parser takes a lone CR as a line break in some places and not in others: "x\r\r", "x\r# c", "!foo\r- a", "\r!" and an empty line written "\n\r" reject the document, where [28] b-break takes a lone CR. Any valid document holding a lone CR is covered, so a defect of another kind in such a document is hiddendefect2696
tag-without-constructor: the loader builds values for the core schema's tags only, and rejects any other tag, local or global: "!foo", "!!merge", "!!timestamp", "!!binary"position996
bom-before-content: the reference parser takes a byte order mark before "---", a directive, a space or a break, and rejects one right before content or a comment, where [202] l-document-prefix takes it: "\ufeffa: 1" rejects the documentdefect670
integer-past-long: the loader builds integers as 64-bit longs, and rejects one past their range, written in decimal, octal or hexadecimalposition145
json-key-properties-adjacent-value: the reference parser rejects a quoted key with node properties in a flow mapping when its value follows the ':' with no space: "{!!str "" :x}", "{! 'p':x}" and "{? !!str " ":9}" are rejected, where c-flow-json-node takes the properties and c-ns-flow-map-adjacent-value the value; "{"" :x}" and "{!!str "": x}" are accepteddefect6
yamlstarrejected, tagged13encoding/bom: yamlstar has not ruled on this7
key/duplicate: the loader does not check this settled rule: it keeps the last value of a key written twice, so "a: 1\na: 2" loads as {"a": 2}6
yamlstaraccepted, explained31yaml-directive-unchecked: the reference parser does not check the version number of a %YAML directive, as perlref does notleniency24
lone-cr-in-block-scalar: the reference parser takes a line at column 0 into a top-level block scalar when the lines end in lone CRs, where that line ends the scalar: ">-\r .\r5" is accepted with the value " .\n5", and the same document with LF breaks is rejecteddefect7
yamlstaraccepted, tagged9encoding/bom: yamlstar has not ruled on this9
yaml.v3accepted, against the rules4key/duplicate-after-resolution: 3.2.1.1: keys are equal when they resolve to the same node, however they are written3
anchor/alias-across-documents: 3.2.2.2: anchor names are local to a document, so an earlier document's anchor is out of scope1
yaml.v3rejected, settled2542key/duplicate: 3.2.1.1: it is an error for two equal keys to appear in the same mapping node2083
anchor/alias-undefined: 7.1: an alias refers to the most recent preceding node having the given anchor, and there is none224
tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not216
directive/yaml-major-version: 6.8.1: a processor must reject a directive whose major version differs from its own9
escape/past-unicode: 5.7: \U escapes a 32-bit Unicode character, and no character lies past U+10FFFF4
key/duplicate-after-resolution: 3.2.1.1: keys are equal when they resolve to the same node, however they are written2
anchor/alias-forward: 7.1: the anchor must precede the alias, so a forward reference names nothing1
directive/yaml-repeated: 6.8.1: it is an error to specify more than one YAML directive for the same document1
directive/tag-handle-repeated: 6.8.2.2: it is an error to specify more than one TAG directive for the same handle in the same document1
directive/handle-out-of-scope: 6.8.2.2: TAG directives apply to the document that follows them, so a later document has no such handle1
yaml.v3rejected, as declared33directive/yaml-minor-version: yaml.v3 accepts a %YAML directive for version 1.1 only, and rejects any other minor version20
anchor/cyclic-meaning: yaml.v3 rejects an alias inside the node its anchor names, with "anchor 'x' value contains itself"4
merge/into-non-mapping: yaml.v3 rejects a merge key whose value is not a mapping or a sequence of mappings2
tag/int-not-an-integer: yaml.v3 refuses this on purpose1
tag/float-not-a-number: yaml.v3 refuses this on purpose1
tag/bool-not-a-boolean: yaml.v3 refuses this on purpose1
tag/null-not-null: yaml.v3 refuses this on purpose1
tag/timestamp-not-a-date: yaml.v3 refuses this on purpose1
tag/binary-not-base64: yaml.v3 refuses this on purpose1
merge/key-alone: yaml.v3 refuses this on purpose1
yaml.v3rejected after the parse984the loader rejects a document the corpus vouches for only up to parse901
the composer rejects a document the corpus vouches for only up to parse83
yaml.v3rejected, explained4210yaml-directive-1.1-only: yaml.v3 accepts a %YAML directive for version 1.1 only, so "%YAML 1.2" rejects the documentdefect2015
tab-as-separation: yaml.v3 rejects a tab after a block indicator or before the node on a line, where s-separate-in-line takes a tab: "-\tfalse" and "?\ta" reject the documentdefect831
reserved-directive-refused: yaml.v3 rejects a directive other than %YAML and %TAG, and a directive name with a character other than a letter, a digit, '-' or '_', where 6.8 ignores a reserved directive with a warningdefect539
indicator-counted-from-0: yaml.v3 counts a top-level block scalar's indentation indicator from column 0. The root node has n = -1 ([207] l-bare-document), and [170] sets the content indentation to n+m, so "--- |3" holds its content at 2 spaces, as the column 0 content of example 9.5 needsdefect321
anchor-name-chars: yaml.v3 reads an anchor or alias name of letters, digits, '-' and '_' only, where ns-anchor-char takes any non-space character but the flow indicators: "&a`" rejects the documentdefect177
empty-implicit-key: yaml.v3 rejects a block mapping entry that starts with ':', which l-block-map-implicit-entry reads as an empty key: "a: 1\n: 2" rejects the documentdefect81
bare-document-after-end: yaml.v3 requires a "---" before every document after the first, so a bare document after a "..." end marker rejects the streamdefect62
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 documentposition44
timestamp-space-and-zone: yaml.v3 reads a timestamp with a space before the time only without a time zone, so a !!timestamp tag on "2001-12-14 21:59:43.10 -5" or "1913-07-08 02:01:00.19Z", both of the 1.1 timestamp type, rejects the documentdefect33
block-scalar-at-column-0: a top-level block scalar without an indentation indicator may hold its content at column 0, as in spec example 9.5; yaml.v3 ends the scalar empty instead, then rejects the content as a second documentdefect32
hash-in-tag: yaml.v3 ends a tag or a %TAG prefix at a '#', which ns-uri-char takes: "!foo# x" and "!<tag:yaml.org,200#:int> 1" reject the documentdefect18
int-past-int64: an integer past int64 and uint64 resolves to a float, so a !!int tag on it rejects the document: !!int 709020151362207020812position13
float-past-float64-tagged: a float past a float64's range does not resolve to a float, so a !!float tag on it rejects the document: !!float 2.8e+332position12
escape-slash: yaml.v3 rejects the escape "\/", which YAML 1.2 adds as [53] ns-esc-slash: "a\/b" rejects the documentdefect11
flow-entry-starting-with-colon: yaml.v3 rejects a flow entry that starts with ':', both an empty key, "[:]", and a plain scalar such as "[:a]", which ns-plain-first takes in flow context when a safe character follows the ':'defect9
tab-opens-block-content: yaml.v3 rejects a tab at the start of a block scalar's content, where the indentation ends and the tab is content: "|\n \tx" rejects the documentdefect8
int-leading-zero: yaml.v3 reads "09" and "099" as octal, fails, and resolves them to a float, so a !!int tag on them rejects the document; the core schema reads them as 9 and 99defect4
yaml.v3rejected, tagged29encoding/bom: yaml.v3 has not ruled on this26
json/not-representable: yaml.v3 has not ruled on this2
key/not-a-string: yaml.v3 has not ruled on this1
yaml.v3rejected42nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus.42
yaml.v3accepted, explained223tag-shorthand-unchecked: yaml.v3 reads a tag shorthand up to the next space, and takes characters ns-tag-char excludes: "!!!int" and "!!bina[ry" are acceptedleniency106
bom-not-first: yaml.v3 reads a byte order mark after the first byte as content, where the grammar allows none: " \ufefftrue" decodes as the string "\ufefftrue"leniency82
comment-without-space: yaml.v3 takes a comment right after a closing quote or bracket, where s-b-comment needs a space before the '#': "{}# c1" is acceptedleniency34
question-mark-before-closing-brace: yaml.v3 takes a lone '?' right before '}' as an explicit key with an empty key and value, where [142] needs a separation after the '?' indicator and [126] keeps it from opening a plain scalar: "{?}" is accepted. It rejects "[?]", and the valid "[? ]" with itleniency1
yaml.v3accepted, tagged2encoding/bom: yaml.v3 has not ruled on this2
yaml.v3accepted, invalid13nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus.13
go-yamlrejected, settled2546key/duplicate: 3.2.1.1: it is an error for two equal keys to appear in the same mapping node2083
anchor/alias-undefined: 7.1: an alias refers to the most recent preceding node having the given anchor, and there is none224
tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not216
directive/yaml-major-version: 6.8.1: a processor must reject a directive whose major version differs from its own9
key/duplicate-after-resolution: 3.2.1.1: keys are equal when they resolve to the same node, however they are written5
escape/past-unicode: 5.7: \U escapes a 32-bit Unicode character, and no character lies past U+10FFFF4
anchor/alias-forward: 7.1: the anchor must precede the alias, so a forward reference names nothing1
anchor/alias-across-documents: 3.2.2.2: anchor names are local to a document, so an earlier document's anchor is out of scope1
directive/yaml-repeated: 6.8.1: it is an error to specify more than one YAML directive for the same document1
directive/tag-handle-repeated: 6.8.2.2: it is an error to specify more than one TAG directive for the same handle in the same document1
directive/handle-out-of-scope: 6.8.2.2: TAG directives apply to the document that follows them, so a later document has no such handle1
go-yamlrejected, as declared44directive/yaml-minor-version: go-yaml refuses this on purpose20
tag/kind-mismatch: go-yaml refuses this on purpose11
anchor/cyclic-meaning: go-yaml refuses this on purpose4
tag/omap-not-a-sequence-of-pairs: go-yaml refuses this on purpose2
key/not-a-scalar: go-yaml refuses this on purpose1
tag/int-not-an-integer: go-yaml refuses this on purpose1
tag/float-not-a-number: go-yaml refuses this on purpose1
tag/bool-not-a-boolean: go-yaml refuses this on purpose1
tag/null-not-null: go-yaml refuses this on purpose1
tag/timestamp-not-a-date: go-yaml refuses this on purpose1
tag/binary-not-base64: go-yaml refuses this on purpose1
go-yamlrejected after the parse1496the loader rejects a document the corpus vouches for only up to parse1354
the composer rejects a document the corpus vouches for only up to parse142
go-yamlrejected, explained141json-cannot-write: codec.ToJSON rejects a value JSON cannot hold: .inf, .nan, a collection as a key; the corpus tags some of these documents json/not-representable and leaves others untaggedposition114
merge-key-without-mapping: go-yaml reads a !!merge key only when a mapping, an alias to one, or a sequence of them follows, and these mutants leave the merge key with nothing to mergeposition26
json-member-collision: codec.ToJSON writes each key as a JSON member name and rejects two distinct keys that write the same name, such as 1 and "1"position1

The value a parser builds from a valid document, written as JSON, against the value the corpus states. The corpus states a value for 2864 of its 19519 valid documents, and the table counts those. perlref builds no values, so the table leaves it out.

parserdocuments with a stated value: 2864rejected, so no value: the verdict table counts these too
samedifferent, explaineddifferent, taggeddifferentno valuesettledas declaredafter the parseexplainedtaggedunexplainederror
libfyaml22004581200011290100
yamlstar17184024140040721100
yaml.v318254741215040541200
go-yaml285900000401000

The parsers build different values for 6591 documents, counting the documents with no stated value.

Reasons

One group for each cell of the table above, with the cell's count and the reasons behind it: a settled rule, a declared stand, a departure from the parser's stance file, an open tag, or nothing at all.

Click a count above to jump to its group. Each case count links to a page listing the first cases, and its tooltip shows the first document.

parsercolumncountreasonkindcases
libfyamldifferent, explained458explicit-merge-not-applied: the Python binding does not apply the merge key, even under an explicit !!merge tag, and keeps "<<" as a plain keyposition128
ordered-map-as-sequence: the Python binding has no ordered map, and returns !!omap as a sequence of one-pair mappingsposition108
wide-integer-as-text: the Python binding returns an integer past 64 bits as a string: -803850883125972097111 comes back as "-803850883125972097111"position63
float-past-double-as-text: the Python binding returns a float past a double's range as a string, "-9.948e-328"position54
timestamp-as-text: the Python binding returns a !!timestamp as the text written, where the corpus states it in RFC 3339 form: "1900-10-14" for "1900-10-14T00:00:00Z"position48
float-as-double: a float with more digits than a double holds comes back rounded: 1.143173161916425300746010 comes back as 1.1431731619164254position29
binary-as-bytes: the Python binding decodes !!binary into its bytes, which the runner writes as a string, where the corpus states the base64 text: !!binary "Aw==" comes back as "\u0003"position21
indicator-counted-from-0-value: the Python binding counts a top-level block scalar's indentation indicator from column 0, one space deeper than n+m with the root's n = -1, so the content loses a leading space: "|3-" over a line of 3 spaces gives "" for " "defect7
libfyamldifferent, tagged1encoding/bom: libfyaml has not ruled on this1
libfyamldifferent2nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus.2
libfyamlrejected after the parse112the loader rejects the document past parse, where the verdict is given112
libfyamlrejected, explained90indicator-counted-from-0: fy-tool counts a top-level block scalar's indentation indicator from column 0. The root node has n = -1 ([207] l-bare-document), and [170] sets the content indentation to n+m, so "--- |3" holds its content at 2 spaces, as the column 0 content of example 9.5 needs. After a reserved directive, fy-tool writes the warning "Unsupported directive" first, and the indentation error after itdefect71
tab-after-explicit-key: fy-tool rejects the ':' of an explicit entry whose '?' a tab follows: "?\ta\n: b" is rejected, where s-separate takes the tab before a scalar keydefect19
libfyamlrejected, tagged1indentation/tab-opens-content: fy-tool rejects a tab opening a top-level block scalar's content in a bare document, "|\n\tx" fails with "invalid tab character as indent instead of space", and accepts it after a "---": "--- !!str |\n\tx"1
yamlstardifferent, explained402escape-as-decimal: the reference parser writes a \x, \u or \U escape as the decimal number of its code point instead of the character: "\u00e9" comes back as "233", and "\x2D\x61" as "4597"defect142
merge-key-applied: the loader applies the 1.1 merge key: it merges the mapping under "<<" into the mapping that holds it, where the core schema keeps "<<" as a plain keyposition94
float-past-double: floats are doubles: one too small comes back as 0, and one too large as Infinity, which JSON cannot write, so the runner holds no value for itposition59
int-non-decimal-as-string: the loader leaves an integer written 0x or 0o a string, where the core schema reads 0x1A as 26 and 0o17 as 15defect40
float-as-double: a float with more digits than a double holds comes back rounded: 2.8111461674232220341922547372150453 comes back as 2.811146167423222position24
ordered-map-as-sequence: the loader has no ordered map, and builds !!omap as a sequence of one-pair mappingsposition22
block-scalar-lone-cr: in a block scalar broken by lone CRs, the reference parser keeps the first space of the indentation as content: "a: |\r x\r" gives " x\n" for "x\n"defect21
yamlstardifferent, tagged4encoding/bom: yamlstar has not ruled on this3
key/not-a-string: yamlstar has not ruled on this1
yamlstardifferent14nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus.14
yamlstarrejected, as declared4anchor/cyclic-meaning: the loader knows an anchor only once its node ends, so an alias inside that node names nothing: "a: &x [ *x ]" rejects the document with "Unknown anchor: x"4
yamlstarrejected, explained721tag-without-constructor: the loader builds values for the core schema's tags only, and rejects any other tag, local or global: "!foo", "!!merge", "!!timestamp", "!!binary"position292
lone-cr-break: the reference parser takes a lone CR as a line break in some places and not in others: "x\r\r", "x\r# c", "!foo\r- a", "\r!" and an empty line written "\n\r" reject the document, where [28] b-break takes a lone CR. Any valid document holding a lone CR is covered, so a defect of another kind in such a document is hiddendefect226
bom-before-content: the reference parser takes a byte order mark before "---", a directive, a space or a break, and rejects one right before content or a comment, where [202] l-document-prefix takes it: "\ufeffa: 1" rejects the documentdefect123
integer-past-long: the loader builds integers as 64-bit longs, and rejects one past their range, written in decimal, octal or hexadecimalposition80
yamlstarrejected, tagged1encoding/bom: yamlstar has not ruled on this1
yaml.v3different, explained474merge-key-applied: yaml.v3 applies the 1.1 merge key: it merges the mapping under "<<" into the mapping that holds it, where the core schema keeps "<<" as a plain keyposition179
binary-as-bytes: yaml.v3 decodes !!binary into its bytes, which the runner writes as a string, where the corpus states the base64 text: !!binary "Iwc=" comes back as "#\u0007"position68
wide-integer-as-float64: an integer past uint64 decodes into a float64, which keeps about 17 significant digits: -803850883125972097111 comes back as -803850883125972000000position53
float-past-float64: a float too small for a float64 decodes as 0, and one too large is left a string, because yaml.v3 does not resolve it to a float: 9.999e+442 comes back as "9.999e+442"position51
ordered-map-as-sequence: yaml.v3 has no ordered map, and decodes !!omap as a sequence of one-pair mappingsposition46
json-cannot-write: yaml.v3 decodes a mapping with a key that is not a string into a map[any]any, which encoding/json cannot write, so the runner has no value for the document: "-0.0: true"position30
float-as-float64: a float with more digits than a float64 holds comes back rounded: 1.0146890218152647300502110008166221703622 comes back as 1.0146890218152647position27
indicator-counted-from-0-value: yaml.v3 counts a top-level block scalar's indentation indicator from column 0, one space deeper than n+m with the root's n = -1. The content loses a leading space, "|3-" over a line of 3 spaces gives "" for " ", and a line at the spec's indentation falls outside the scalar: "|2-" over " #a" gives "" for "#a"defect11
int-octal-legacy: yaml.v3 reads an integer with a leading 0 as octal, as YAML 1.1 does, so 077 comes back as 63position6
int-underscores: yaml.v3 reads 1_000 as the integer 1000, as YAML 1.1 does, where the core schema keeps it a stringposition1
int-binary: yaml.v3 reads 0b1010 as the integer 10, as YAML 1.1 does, where the core schema keeps it a stringposition1
timestamp-untagged: yaml.v3 resolves a plain 2001-12-14 to a timestamp, as YAML 1.1 does, where the core schema keeps it a stringposition1
yaml.v3different, tagged1encoding/bom: yaml.v3 has not ruled on this1
yaml.v3different2nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus.2
yaml.v3no value15the parser accepts the document and returns no value for it15
yaml.v3rejected, as declared4anchor/cyclic-meaning: yaml.v3 rejects an alias inside the node its anchor names, with "anchor 'x' value contains itself"4
yaml.v3rejected, explained541yaml-directive-1.1-only: yaml.v3 accepts a %YAML directive for version 1.1 only, so "%YAML 1.2" rejects the documentdefect357
tab-as-separation: yaml.v3 rejects a tab after a block indicator or before the node on a line, where s-separate-in-line takes a tab: "-\tfalse" and "?\ta" reject the documentdefect69
indicator-counted-from-0: yaml.v3 counts a top-level block scalar's indentation indicator from column 0. The root node has n = -1 ([207] l-bare-document), and [170] sets the content indentation to n+m, so "--- |3" holds its content at 2 spaces, as the column 0 content of example 9.5 needsdefect59
timestamp-space-and-zone: yaml.v3 reads a timestamp with a space before the time only without a time zone, so a !!timestamp tag on "2001-12-14 21:59:43.10 -5" or "1913-07-08 02:01:00.19Z", both of the 1.1 timestamp type, rejects the documentdefect24
float-past-float64-tagged: a float past a float64's range does not resolve to a float, so a !!float tag on it rejects the document: !!float 2.8e+332position11
int-past-int64: an integer past int64 and uint64 resolves to a float, so a !!int tag on it rejects the document: !!int 709020151362207020812position9
tab-opens-block-content: yaml.v3 rejects a tab at the start of a block scalar's content, where the indentation ends and the tab is content: "|\n \tx" rejects the documentdefect4
int-leading-zero: yaml.v3 reads "09" and "099" as octal, fails, and resolves them to a float, so a !!int tag on them rejects the document; the core schema reads them as 9 and 99defect3
block-scalar-at-column-0: a top-level block scalar without an indentation indicator may hold its content at column 0, as in spec example 9.5; yaml.v3 ends the scalar empty instead, then rejects the content as a second documentdefect2
empty-implicit-key: yaml.v3 rejects a block mapping entry that starts with ':', which l-block-map-implicit-entry reads as an empty key: "a: 1\n: 2" rejects the documentdefect1
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 documentposition1
escape-slash: yaml.v3 rejects the escape "\/", which YAML 1.2 adds as [53] ns-esc-slash: "a\/b" rejects the documentdefect1
yaml.v3rejected, tagged2encoding/bom: yaml.v3 has not ruled on this2
go-yamlrejected, as declared4anchor/cyclic-meaning: go-yaml refuses this on purpose4
go-yamlrejected, explained1json-cannot-write: codec.ToJSON rejects a value JSON cannot hold: .inf, .nan, a collection as a key; the corpus tags some of these documents json/not-representable and leaves others untaggedposition1

Each parser writes the value it read back as YAML with its own encoder, reads that again, and compares the two values in its own types, so an int that comes back as a float differs. yaml.v3 uses yaml.Marshal and yaml.Unmarshal; go-yaml uses codec.NewDecoder, codec.Marshal and codec.Unmarshal. The corpus states nothing here: the check is decode(encode(decode(d))) against decode(d), on every document the parser accepts.

parserdocuments the parser accepts
samedifferentcannot writecannot read backcyclicrejectederror
yaml.v31079911060120163620
go-yaml152920000129870

Corpus compact, 28279 cases, yamlcorpus/48. Run 2026-11-26 22:12 UTC, 23m30s.