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.
| tier | compact |
| documents | 28279: 19519 valid, 8760 invalid |
| with a stated value | 2864 |
| carrying a tag | 9412, under 66 tags |
| size | 3.0 MiB |
| grammar | YAML 1.2 |
| corpus generator | yamlcorpus/48 |
| conformance-suites commit | v0.0.4 |
| corpus digest | sha256:a0bb2e920a6cd07b5ed467f6cc561a61f096d34a8cdaae40aa572b17ebebf601 |
| id | implementation | version | time over the corpus | this run |
|---|---|---|---|---|
| perlref | YAML 1.2 reference parser (Perl), yaml/yaml-reference-parser | main d58347b997eea4d7e5ba33b36871535dad6db081 | 4552.4 s | not recorded |
| libfyaml | libfyaml (C): fy-tool for events, the Python binding for values | binding 1.0.0rc2, 1.0.0-rc2 | 1135.7 s | not recorded |
| yamlstar | YAMLStar (Clojure), its own reference parser | yaml v0.1.28 | 532.7 s | not recorded |
| yaml.v3 | go.yaml.in/yaml/v3 (Go) | go.yaml.in/yaml/v3 v3.0.6 | 2.4 s | not recorded |
| go-yaml | github.com/go-openapi/go-yaml (Go) | go-openapi/go-yaml: v0.0.0-20261126182158-1aed24577d00 | 52.8 s | not 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.
| parser | valid documents: 19519 | invalid documents: 8760 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| accepted | accepted, against the rules | rejected, settled | rejected, as declared | rejected after the parse | rejected, explained | rejected, tagged | rejected | rejected | accepted, explained | accepted, tagged | accepted | error | |
| perlref | 15852 | 0 | 287 | 0 | 0 | 3373 | 7 | 0 | 7518 | 1241 | 0 | 1 | 0 |
| libfyaml | 18405 | 1 | 240 | 0 | 0 | 835 | 5 | 33 | 8382 | 371 | 0 | 7 | 0 |
| yamlstar | 11161 | 18 | 445 | 8 | 3361 | 4513 | 13 | 0 | 8720 | 31 | 9 | 0 | 0 |
| yaml.v3 | 11675 | 4 | 2542 | 33 | 984 | 4210 | 29 | 42 | 8522 | 223 | 2 | 13 | 0 |
| go-yaml | 15292 | 0 | 2546 | 44 | 1496 | 141 | 0 | 0 | 8760 | 0 | 0 | 0 | 0 |
The parsers do not all give the same verdict on 13929 documents.
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.
| parser | column | count | reason | kind | cases |
|---|---|---|---|---|---|
| perlref | accepted | 15852 | key/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 rule | 1347 | |
| the rest agree with the corpus and need no reason | 14505 | ||||
| perlref | rejected, settled | 287 | tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not | 216 | |
| 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 parse | 69 | ||||
| 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 parse | 1 | ||||
| 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 parse | 1 | ||||
| perlref | rejected, explained | 3373 | lone-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 hidden | defect | 2697 |
| 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 document | defect | 670 | |||
| 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 accepted | defect | 6 | |||
| perlref | rejected, tagged | 7 | encoding/bom: perlref has not ruled on this | 7 | |
| perlref | accepted, explained | 1241 | bytes-not-utf8: the parser does not check that its input is UTF-8 | leniency | 893 |
| 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 names | leniency | 275 | |||
| bom-anywhere: the parser takes a byte order mark where the grammar allows none | leniency | 39 | |||
| yaml-directive-unchecked: the parser does not check the version number of a %YAML directive | leniency | 27 | |||
| 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 rejected | defect | 6 | |||
| 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 do | defect | 1 | |||
| perlref | accepted, invalid | 1 | nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus. | 1 | |
| libfyaml | accepted | 18405 | key/duplicate: fy-tool writes events without checking for a key written twice, and accepts most documents that write one | 1573 | |
| 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 on | 1 | ||||
| the rest agree with the corpus and need no reason | 16831 | ||||
| libfyaml | accepted, against the rules | 1 | tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not | 1 | |
| libfyaml | rejected, settled | 240 | tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not | 215 | |
| 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 parse | 9 | ||||
| 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 parse | 9 | ||||
| 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 parse | 4 | ||||
| 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 parse | 1 | ||||
| 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 parse | 1 | ||||
| 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 parse | 1 | ||||
| libfyaml | rejected, explained | 835 | indicator-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 it | defect | 440 |
| 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 key | defect | 239 | |||
| 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 tab | defect | 136 | |||
| 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" | defect | 9 | |||
| 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 tab | defect | 6 | |||
| 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 0 | defect | 5 | |||
| libfyaml | rejected, tagged | 5 | encoding/bom: libfyaml has not ruled on this | 3 | |
| 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 | ||||
| libfyaml | rejected | 33 | nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus. | 33 | |
| libfyaml | accepted, explained | 371 | control-chars-unchecked: fy-tool takes a control character that c-printable excludes, in a scalar or a comment: "-1 # \x1e1" is accepted | leniency | 132 |
| 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 accepted | leniency | 103 | |||
| bom-not-first: fy-tool takes a byte order mark after the first byte, where the grammar allows none | leniency | 97 | |||
| directives-without-document: fy-tool takes a stream of directives that no "---" follows, where l-directive-document needs one: "%YA" is accepted | leniency | 24 | |||
| 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 accepted | leniency | 13 | |||
| 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 ["?"] | leniency | 2 | |||
| libfyaml | accepted, invalid | 7 | nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus. | 7 | |
| yamlstar | accepted | 11161 | 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} | 779 | |
| the rest agree with the corpus and need no reason | 10382 | ||||
| yamlstar | accepted, against the rules | 18 | directive/yaml-major-version: 6.8.1: a processor must reject a directive whose major version differs from its own | 9 | |
| key/duplicate-after-resolution: 3.2.1.1: keys are equal when they resolve to the same node, however they are written | 5 | ||||
| escape/past-unicode: 5.7: \U escapes a 32-bit Unicode character, and no character lies past U+10FFFF | 3 | ||||
| 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 | 1 | ||||
| yamlstar | rejected, settled | 445 | anchor/alias-undefined: 7.1: an alias refers to the most recent preceding node having the given anchor, and there is none | 224 | |
| tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not | 216 | ||||
| anchor/alias-forward: 7.1: the anchor must precede the alias, so a forward reference names nothing | 1 | ||||
| anchor/alias-across-documents: 3.2.2.2: anchor names are local to a document, so an earlier document's anchor is out of scope | 1 | ||||
| directive/yaml-repeated: 6.8.1: it is an error to specify more than one YAML directive for the same document | 1 | ||||
| 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 | 1 | ||||
| escape/past-unicode: 5.7: \U escapes a 32-bit Unicode character, and no character lies past U+10FFFF | 1 | ||||
| yamlstar | rejected, as declared | 8 | anchor/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 mappings | 2 | ||||
| merge/key-alone: yamlstar refuses this on purpose | 2 | ||||
| yamlstar | rejected after the parse | 3361 | the loader rejects a document the corpus vouches for only up to parse | 3361 | |
| yamlstar | rejected, explained | 4513 | 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 hidden | defect | 2696 |
| 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" | position | 996 | |||
| 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 document | defect | 670 | |||
| integer-past-long: the loader builds integers as 64-bit longs, and rejects one past their range, written in decimal, octal or hexadecimal | position | 145 | |||
| 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 accepted | defect | 6 | |||
| yamlstar | rejected, tagged | 13 | encoding/bom: yamlstar has not ruled on this | 7 | |
| 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 | ||||
| yamlstar | accepted, explained | 31 | yaml-directive-unchecked: the reference parser does not check the version number of a %YAML directive, as perlref does not | leniency | 24 |
| 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 rejected | defect | 7 | |||
| yamlstar | accepted, tagged | 9 | encoding/bom: yamlstar has not ruled on this | 9 | |
| yaml.v3 | accepted, against the rules | 4 | key/duplicate-after-resolution: 3.2.1.1: keys are equal when they resolve to the same node, however they are written | 3 | |
| anchor/alias-across-documents: 3.2.2.2: anchor names are local to a document, so an earlier document's anchor is out of scope | 1 | ||||
| yaml.v3 | rejected, settled | 2542 | key/duplicate: 3.2.1.1: it is an error for two equal keys to appear in the same mapping node | 2083 | |
| anchor/alias-undefined: 7.1: an alias refers to the most recent preceding node having the given anchor, and there is none | 224 | ||||
| tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not | 216 | ||||
| directive/yaml-major-version: 6.8.1: a processor must reject a directive whose major version differs from its own | 9 | ||||
| escape/past-unicode: 5.7: \U escapes a 32-bit Unicode character, and no character lies past U+10FFFF | 4 | ||||
| key/duplicate-after-resolution: 3.2.1.1: keys are equal when they resolve to the same node, however they are written | 2 | ||||
| anchor/alias-forward: 7.1: the anchor must precede the alias, so a forward reference names nothing | 1 | ||||
| directive/yaml-repeated: 6.8.1: it is an error to specify more than one YAML directive for the same document | 1 | ||||
| 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 | 1 | ||||
| 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 | 1 | ||||
| yaml.v3 | rejected, as declared | 33 | directive/yaml-minor-version: yaml.v3 accepts a %YAML directive for version 1.1 only, and rejects any other minor version | 20 | |
| 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 mappings | 2 | ||||
| tag/int-not-an-integer: yaml.v3 refuses this on purpose | 1 | ||||
| tag/float-not-a-number: yaml.v3 refuses this on purpose | 1 | ||||
| tag/bool-not-a-boolean: yaml.v3 refuses this on purpose | 1 | ||||
| tag/null-not-null: yaml.v3 refuses this on purpose | 1 | ||||
| tag/timestamp-not-a-date: yaml.v3 refuses this on purpose | 1 | ||||
| tag/binary-not-base64: yaml.v3 refuses this on purpose | 1 | ||||
| merge/key-alone: yaml.v3 refuses this on purpose | 1 | ||||
| yaml.v3 | rejected after the parse | 984 | the loader rejects a document the corpus vouches for only up to parse | 901 | |
| the composer rejects a document the corpus vouches for only up to parse | 83 | ||||
| yaml.v3 | rejected, explained | 4210 | yaml-directive-1.1-only: yaml.v3 accepts a %YAML directive for version 1.1 only, so "%YAML 1.2" rejects the document | defect | 2015 |
| 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 document | defect | 831 | |||
| 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 warning | defect | 539 | |||
| 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 needs | defect | 321 | |||
| 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 document | defect | 177 | |||
| 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 document | defect | 81 | |||
| bare-document-after-end: yaml.v3 requires a "---" before every document after the first, so a bare document after a "..." end marker rejects the stream | defect | 62 | |||
| 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 | position | 44 | |||
| 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 document | defect | 33 | |||
| 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 document | defect | 32 | |||
| 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 document | defect | 18 | |||
| int-past-int64: an integer past int64 and uint64 resolves to a float, so a !!int tag on it rejects the document: !!int 709020151362207020812 | position | 13 | |||
| 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+332 | position | 12 | |||
| escape-slash: yaml.v3 rejects the escape "\/", which YAML 1.2 adds as [53] ns-esc-slash: "a\/b" rejects the document | defect | 11 | |||
| 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 ':' | defect | 9 | |||
| 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 document | defect | 8 | |||
| 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 99 | defect | 4 | |||
| yaml.v3 | rejected, tagged | 29 | encoding/bom: yaml.v3 has not ruled on this | 26 | |
| json/not-representable: yaml.v3 has not ruled on this | 2 | ||||
| key/not-a-string: yaml.v3 has not ruled on this | 1 | ||||
| yaml.v3 | rejected | 42 | nothing 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.v3 | accepted, explained | 223 | tag-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 accepted | leniency | 106 |
| 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" | leniency | 82 | |||
| 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 accepted | leniency | 34 | |||
| 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 it | leniency | 1 | |||
| yaml.v3 | accepted, tagged | 2 | encoding/bom: yaml.v3 has not ruled on this | 2 | |
| yaml.v3 | accepted, invalid | 13 | nothing 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-yaml | rejected, settled | 2546 | key/duplicate: 3.2.1.1: it is an error for two equal keys to appear in the same mapping node | 2083 | |
| anchor/alias-undefined: 7.1: an alias refers to the most recent preceding node having the given anchor, and there is none | 224 | ||||
| tag/undeclared-handle: 6.8.2.2: a tag shorthand must use a handle a %TAG directive declared, and this one does not | 216 | ||||
| directive/yaml-major-version: 6.8.1: a processor must reject a directive whose major version differs from its own | 9 | ||||
| key/duplicate-after-resolution: 3.2.1.1: keys are equal when they resolve to the same node, however they are written | 5 | ||||
| escape/past-unicode: 5.7: \U escapes a 32-bit Unicode character, and no character lies past U+10FFFF | 4 | ||||
| anchor/alias-forward: 7.1: the anchor must precede the alias, so a forward reference names nothing | 1 | ||||
| anchor/alias-across-documents: 3.2.2.2: anchor names are local to a document, so an earlier document's anchor is out of scope | 1 | ||||
| directive/yaml-repeated: 6.8.1: it is an error to specify more than one YAML directive for the same document | 1 | ||||
| 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 | 1 | ||||
| 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 | 1 | ||||
| go-yaml | rejected, as declared | 44 | directive/yaml-minor-version: go-yaml refuses this on purpose | 20 | |
| tag/kind-mismatch: go-yaml refuses this on purpose | 11 | ||||
| anchor/cyclic-meaning: go-yaml refuses this on purpose | 4 | ||||
| tag/omap-not-a-sequence-of-pairs: go-yaml refuses this on purpose | 2 | ||||
| key/not-a-scalar: go-yaml refuses this on purpose | 1 | ||||
| tag/int-not-an-integer: go-yaml refuses this on purpose | 1 | ||||
| tag/float-not-a-number: go-yaml refuses this on purpose | 1 | ||||
| tag/bool-not-a-boolean: go-yaml refuses this on purpose | 1 | ||||
| tag/null-not-null: go-yaml refuses this on purpose | 1 | ||||
| tag/timestamp-not-a-date: go-yaml refuses this on purpose | 1 | ||||
| tag/binary-not-base64: go-yaml refuses this on purpose | 1 | ||||
| go-yaml | rejected after the parse | 1496 | the loader rejects a document the corpus vouches for only up to parse | 1354 | |
| the composer rejects a document the corpus vouches for only up to parse | 142 | ||||
| go-yaml | rejected, explained | 141 | json-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 untagged | position | 114 |
| 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 merge | position | 26 | |||
| 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" | position | 1 |
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.
| parser | documents with a stated value: 2864 | rejected, so no value: the verdict table counts these too | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| same | different, explained | different, tagged | different | no value | settled | as declared | after the parse | explained | tagged | unexplained | error | |
| libfyaml | 2200 | 458 | 1 | 2 | 0 | 0 | 0 | 112 | 90 | 1 | 0 | 0 |
| yamlstar | 1718 | 402 | 4 | 14 | 0 | 0 | 4 | 0 | 721 | 1 | 0 | 0 |
| yaml.v3 | 1825 | 474 | 1 | 2 | 15 | 0 | 4 | 0 | 541 | 2 | 0 | 0 |
| go-yaml | 2859 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 1 | 0 | 0 | 0 |
The parsers build different values for 6591 documents, counting the documents with no stated value.
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.
| parser | column | count | reason | kind | cases |
|---|---|---|---|---|---|
| libfyaml | different, explained | 458 | explicit-merge-not-applied: the Python binding does not apply the merge key, even under an explicit !!merge tag, and keeps "<<" as a plain key | position | 128 |
| ordered-map-as-sequence: the Python binding has no ordered map, and returns !!omap as a sequence of one-pair mappings | position | 108 | |||
| wide-integer-as-text: the Python binding returns an integer past 64 bits as a string: -803850883125972097111 comes back as "-803850883125972097111" | position | 63 | |||
| float-past-double-as-text: the Python binding returns a float past a double's range as a string, "-9.948e-328" | position | 54 | |||
| 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" | position | 48 | |||
| float-as-double: a float with more digits than a double holds comes back rounded: 1.143173161916425300746010 comes back as 1.1431731619164254 | position | 29 | |||
| 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" | position | 21 | |||
| 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 " " | defect | 7 | |||
| libfyaml | different, tagged | 1 | encoding/bom: libfyaml has not ruled on this | 1 | |
| libfyaml | different | 2 | nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus. | 2 | |
| libfyaml | rejected after the parse | 112 | the loader rejects the document past parse, where the verdict is given | 112 | |
| libfyaml | rejected, explained | 90 | indicator-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 it | defect | 71 |
| 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 key | defect | 19 | |||
| libfyaml | rejected, tagged | 1 | 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" | 1 | |
| yamlstar | different, explained | 402 | escape-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" | defect | 142 |
| 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 key | position | 94 | |||
| 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 it | position | 59 | |||
| 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 15 | defect | 40 | |||
| float-as-double: a float with more digits than a double holds comes back rounded: 2.8111461674232220341922547372150453 comes back as 2.811146167423222 | position | 24 | |||
| ordered-map-as-sequence: the loader has no ordered map, and builds !!omap as a sequence of one-pair mappings | position | 22 | |||
| 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" | defect | 21 | |||
| yamlstar | different, tagged | 4 | encoding/bom: yamlstar has not ruled on this | 3 | |
| key/not-a-string: yamlstar has not ruled on this | 1 | ||||
| yamlstar | different | 14 | nothing explains it: no settled rule, declared stand, departure or open tag covers the case. A defect in the parser or in the corpus. | 14 | |
| yamlstar | rejected, as declared | 4 | anchor/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 | |
| yamlstar | rejected, explained | 721 | 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" | position | 292 |
| 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 hidden | defect | 226 | |||
| 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 document | defect | 123 | |||
| integer-past-long: the loader builds integers as 64-bit longs, and rejects one past their range, written in decimal, octal or hexadecimal | position | 80 | |||
| yamlstar | rejected, tagged | 1 | encoding/bom: yamlstar has not ruled on this | 1 | |
| yaml.v3 | different, explained | 474 | merge-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 key | position | 179 |
| 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" | position | 68 | |||
| wide-integer-as-float64: an integer past uint64 decodes into a float64, which keeps about 17 significant digits: -803850883125972097111 comes back as -803850883125972000000 | position | 53 | |||
| 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" | position | 51 | |||
| ordered-map-as-sequence: yaml.v3 has no ordered map, and decodes !!omap as a sequence of one-pair mappings | position | 46 | |||
| 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" | position | 30 | |||
| float-as-float64: a float with more digits than a float64 holds comes back rounded: 1.0146890218152647300502110008166221703622 comes back as 1.0146890218152647 | position | 27 | |||
| 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" | defect | 11 | |||
| int-octal-legacy: yaml.v3 reads an integer with a leading 0 as octal, as YAML 1.1 does, so 077 comes back as 63 | position | 6 | |||
| int-underscores: yaml.v3 reads 1_000 as the integer 1000, as YAML 1.1 does, where the core schema keeps it a string | position | 1 | |||
| int-binary: yaml.v3 reads 0b1010 as the integer 10, as YAML 1.1 does, where the core schema keeps it a string | position | 1 | |||
| 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 string | position | 1 | |||
| yaml.v3 | different, tagged | 1 | encoding/bom: yaml.v3 has not ruled on this | 1 | |
| yaml.v3 | different | 2 | nothing 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.v3 | no value | 15 | the parser accepts the document and returns no value for it | 15 | |
| yaml.v3 | rejected, as declared | 4 | anchor/cyclic-meaning: yaml.v3 rejects an alias inside the node its anchor names, with "anchor 'x' value contains itself" | 4 | |
| yaml.v3 | rejected, explained | 541 | yaml-directive-1.1-only: yaml.v3 accepts a %YAML directive for version 1.1 only, so "%YAML 1.2" rejects the document | defect | 357 |
| 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 document | defect | 69 | |||
| 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 needs | defect | 59 | |||
| 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 document | defect | 24 | |||
| 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+332 | position | 11 | |||
| int-past-int64: an integer past int64 and uint64 resolves to a float, so a !!int tag on it rejects the document: !!int 709020151362207020812 | position | 9 | |||
| 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 document | defect | 4 | |||
| 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 99 | defect | 3 | |||
| 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 document | defect | 2 | |||
| 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 document | defect | 1 | |||
| 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 | position | 1 | |||
| escape-slash: yaml.v3 rejects the escape "\/", which YAML 1.2 adds as [53] ns-esc-slash: "a\/b" rejects the document | defect | 1 | |||
| yaml.v3 | rejected, tagged | 2 | encoding/bom: yaml.v3 has not ruled on this | 2 | |
| go-yaml | rejected, as declared | 4 | anchor/cyclic-meaning: go-yaml refuses this on purpose | 4 | |
| go-yaml | rejected, explained | 1 | json-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 untagged | position | 1 |
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.
Corpus compact, 28279 cases, yamlcorpus/48. Run 2026-11-26 22:12 UTC, 23m30s.