Skip to content

Instantly share code, notes, and snippets.

@flucknugget
Last active August 1, 2019 18:52
Show Gist options
  • Save flucknugget/f59dcab58552b65cb8d31266735d0f90 to your computer and use it in GitHub Desktop.
Save flucknugget/f59dcab58552b65cb8d31266735d0f90 to your computer and use it in GitHub Desktop.
All named yaml-test-suite tests as JSON.
[
{
"id": "V55R",
"name": "aliases-in-block-sequence",
"label": "Aliases in Block Sequence",
"error": false,
"tags": [
"sequence",
"alias"
],
"files": {
"in_yaml": "- &a a\n- &b b\n- *a\n- *b\n",
"in_json": "[\n \"a\",\n \"b\",\n \"a\",\n \"b\"\n]\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL &a :a\n=VAL &b :b\n=ALI *a\n=ALI *b\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "6M2F",
"name": "aliases-in-explicit-block-mapping",
"label": "Aliases in Explicit Block Mapping",
"error": false,
"tags": [
"alias",
"missing"
],
"files": {
"in_yaml": "? &a a\n: &b b\n: *a\n",
"in_json": "{\n \"a\": \"b\",\n \"\": \"a\"\n}\n",
"out_yaml": "&a a: &b b\n: *a\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL &a :a\n=VAL &b :b\n=VAL :\n=ALI *a\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "X38W",
"name": "aliases-in-flow-objects",
"label": "Aliases in Flow Objects",
"error": false,
"tags": [
"flow",
"alias"
],
"files": {
"in_yaml": "{ &a [a, &b b]: *b, *a : [c, *b, d]}\n",
"in_json": null,
"out_yaml": "? &a\n- a\n- &b b\n: *b\n*a :\n- c\n- *b\n- d\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n+SEQ &a\n=VAL :a\n=VAL &b :b\n-SEQ\n=ALI *b\n=ALI *a\n+SEQ\n=VAL :c\n=ALI *b\n=VAL :d\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "E76Z",
"name": "aliases-in-implicit-block-mapping",
"label": "Aliases in Implicit Block Mapping",
"error": false,
"tags": [
"alias",
"mapping"
],
"files": {
"in_yaml": "&a a: &b b\n*a : *b\n",
"in_json": "{\n \"a\": \"b\"\n}\n",
"out_yaml": "&a a: &b b\n*a : *b\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL &a :a\n=VAL &b :b\n=ALI *a\n=ALI *b\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "W5VH",
"name": "allowed-characters-in-alias",
"label": "Allowed characters in alias",
"error": false,
"tags": [
"1.3-err",
"alias"
],
"files": {
"in_yaml": "a: &:@*!$\"<foo>: scalar a\nb: *:@*!$\"<foo>:\n",
"in_json": "{\n \"a\": \"scalar a\",\n \"b\": \"scalar a\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n=VAL &:@*!$\"<foo>: :scalar a\n=VAL :b\n=ALI *:@*!$\"<foo>:\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "2EBW",
"name": "allowed-characters-in-keys",
"label": "Allowed characters in keys",
"error": false,
"tags": [
"mapping"
],
"files": {
"in_yaml": "a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~: safe\n?foo: safe question mark\n:foo: safe colon\n-foo: safe dash\nthis is#not: a comment\n",
"in_json": "{\n \"a!\\\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~\": \"safe\",\n \"?foo\": \"safe question mark\",\n \":foo\": \"safe colon\",\n \"-foo\": \"safe dash\",\n \"this is#not\": \"a comment\"\n}\n",
"out_yaml": "a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~: safe\n?foo: safe question mark\n:foo: safe colon\n-foo: safe dash\nthis is#not: a comment\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a!\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~\n=VAL :safe\n=VAL :?foo\n=VAL :safe question mark\n=VAL ::foo\n=VAL :safe colon\n=VAL :-foo\n=VAL :safe dash\n=VAL :this is#not\n=VAL :a comment\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "FBC9",
"name": "allowed-characters-in-plain-scalars",
"label": "Allowed characters in plain scalars",
"error": false,
"tags": [
"scalar"
],
"files": {
"in_yaml": "safe: a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\n !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\nsafe question mark: ?foo\nsafe colon: :foo\nsafe dash: -foo\n",
"in_json": "{\n \"safe\": \"a!\\\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~ !\\\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~\",\n \"safe question mark\": \"?foo\",\n \"safe colon\": \":foo\",\n \"safe dash\": \"-foo\"\n}\n",
"out_yaml": "safe: a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\nsafe question mark: ?foo\nsafe colon: :foo\nsafe dash: -foo\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :safe\n=VAL :a!\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~ !\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~\n=VAL :safe question mark\n=VAL :?foo\n=VAL :safe colon\n=VAL ::foo\n=VAL :safe dash\n=VAL :-foo\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "6SLA",
"name": "allowed-characters-in-quoted-mapping-key",
"label": "Allowed characters in quoted mapping key",
"error": false,
"tags": [
"single",
"double",
"mapping"
],
"files": {
"in_yaml": "\"foo\\nbar:baz\\tx \\\\$%^&*()x\": 23\n'x\\ny:z\\tx $%^&*()x': 24\n",
"in_json": "{\n \"foo\\nbar:baz\\tx \\\\$%^&*()x\": 23,\n \"x\\\\ny:z\\\\tx $%^&*()x\": 24\n}\n",
"out_yaml": "? \"foo\\nbar:baz\\tx \\\\$%^&*()x\"\n: 23\n'x\\ny:z\\tx $%^&*()x': 24\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL \"foo\\nbar:baz\\tx \\\\$%^&*()x\n=VAL :23\n=VAL 'x\\\\ny:z\\\\tx $%^&*()x\n=VAL :24\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "SU74",
"name": "anchor-and-alias-as-mapping-key",
"label": "Anchor and alias as mapping key",
"error": true,
"tags": [
"error",
"alias",
"anchor",
"mapping"
],
"files": {
"in_yaml": "key1: &alias value1\n&b *alias : value2\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key1\n=VAL &alias :value1\n"
}
},
{
"id": "SY6V",
"name": "anchor-before-sequence-entry-on-same-line",
"label": "Anchor before sequence entry on same line",
"error": true,
"tags": [
"sequence",
"error",
"anchor"
],
"files": {
"in_yaml": "&anchor - sequence entry\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n"
}
},
{
"id": "SKE5",
"name": "anchor-before-zero-indented-sequence",
"label": "Anchor before zero indented sequence",
"error": false,
"tags": [
"sequence",
"anchor"
],
"files": {
"in_yaml": "---\nseq:\n &anchor\n- a\n- b\n",
"in_json": "{\n \"seq\": [\n \"a\",\n \"b\"\n ]\n}\n",
"out_yaml": "---\nseq: &anchor\n- a\n- b\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :seq\n+SEQ &anchor\n=VAL :a\n=VAL :b\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "6KGN",
"name": "anchor-for-empty-node",
"label": "Anchor for empty node",
"error": false,
"tags": [
"alias",
"anchor"
],
"files": {
"in_yaml": "---\na: &anchor\nb: *anchor\n",
"in_json": "{\n \"a\": null,\n \"b\": null\n}\n",
"out_yaml": "---\na: &anchor\nb: *anchor\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :a\n=VAL &anchor :\n=VAL :b\n=ALI *anchor\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "SR86",
"name": "anchor-plus-alias",
"label": "Anchor plus Alias",
"error": true,
"tags": [
"error",
"alias"
],
"files": {
"in_yaml": "key1: &a value\nkey2: &b *a\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key1\n=VAL &a :value\n=VAL :key2\n"
}
},
{
"id": "Y2GN",
"name": "anchor-with-colon-in-the-middle",
"label": "Anchor with colon in the middle",
"error": false,
"tags": [
"anchor"
],
"files": {
"in_yaml": "---\nkey: &an:chor value\n",
"in_json": "{\n \"key\": \"value\"\n}\n",
"out_yaml": "---\nkey: &an:chor value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :key\n=VAL &an:chor :value\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "8XYN",
"name": "anchor-with-unicode-character",
"label": "Anchor with unicode character",
"error": false,
"tags": [
"anchor"
],
"files": {
"in_yaml": "---\n- &\ud83d\ude01 unicode anchor\n",
"in_json": "[\n \"unicode anchor\"\n]\n",
"out_yaml": "---\n- &\ud83d\ude01 unicode anchor\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL &\ud83d\ude01 :unicode anchor\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "F2C7",
"name": "anchors-and-tags",
"label": "Anchors and Tags",
"error": false,
"tags": [
"anchor",
"tag"
],
"files": {
"in_yaml": " - &a !!str a\n - !!int 2\n - !!int &c 4\n - &d d\n",
"in_json": "[\n \"a\",\n 2,\n 4,\n \"d\"\n]\n",
"out_yaml": "- &a !!str a\n- !!int 2\n- &c !!int 4\n- &d d\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL &a <tag:yaml.org,2002:str> :a\n=VAL <tag:yaml.org,2002:int> :2\n=VAL &c <tag:yaml.org,2002:int> :4\n=VAL &d :d\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "ZH7C",
"name": "anchors-in-mapping",
"label": "Anchors in Mapping",
"error": false,
"tags": [
"jayt"
],
"files": {
"in_yaml": "&a a: b\nc: &d d\n",
"in_json": "{\n \"a\": \"b\",\n \"c\": \"d\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL &a :a\n=VAL :b\n=VAL :c\n=VAL &d :d\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "PW8X",
"name": "anchors-on-empty-scalars",
"label": "Anchors on Empty Scalars",
"error": false,
"tags": [
"empty",
"anchor",
"missing"
],
"files": {
"in_yaml": "- &a\n- a\n-\n &a : a\n b: &b\n-\n &c : &a\n-\n ? &d\n-\n ? &e\n : &a\n",
"in_json": null,
"out_yaml": "- &a\n- a\n- &a : a\n b: &b\n- &c : &a\n- &d :\n- &e : &a\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL &a :\n=VAL :a\n+MAP\n=VAL &a :\n=VAL :a\n=VAL :b\n=VAL &b :\n-MAP\n+MAP\n=VAL &c :\n=VAL &a :\n-MAP\n+MAP\n=VAL &d :\n=VAL :\n-MAP\n+MAP\n=VAL &e :\n=VAL &a :\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "2SXE",
"name": "anchors-with-colon-in-name",
"label": "Anchors With Colon in Name",
"error": false,
"tags": [
"1.3-err",
"alias",
"edge"
],
"files": {
"in_yaml": "&a: key: &a value\nfoo:\n *a:\n",
"in_json": "{\n \"key\": \"value\",\n \"foo\": \"key\"\n}\n",
"out_yaml": "&a: key: &a value\nfoo: *a:\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL &a: :key\n=VAL &a :value\n=VAL :foo\n=ALI *a:\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "6H3V",
"name": "backslashes-in-singlequotes",
"label": "Backslashes in singlequotes",
"error": false,
"tags": [
"single",
"scalar"
],
"files": {
"in_yaml": "'foo: bar\\': baz'\n",
"in_json": "{\n \"foo: bar\\\\\": \"baz'\"\n}\n",
"out_yaml": "'foo: bar\\': baz'\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL 'foo: bar\\\\\n=VAL :baz'\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "N4JP",
"name": "bad-indentation-in-mapping",
"label": "Bad indentation in mapping",
"error": true,
"tags": [
"error",
"indent",
"double",
"mapping"
],
"files": {
"in_yaml": "map:\n key1: \"quoted1\"\n key2: \"bad indentation\"\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :map\n+MAP\n=VAL :key1\n=VAL \"quoted1\n-MAP\n"
}
},
{
"id": "U44R",
"name": "bad-indentation-in-mapping-2",
"label": "Bad indentation in mapping (2)",
"error": true,
"tags": [
"error",
"indent",
"double",
"mapping"
],
"files": {
"in_yaml": "map:\n key1: \"quoted1\"\n key2: \"bad indentation\"\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :map\n+MAP\n=VAL :key1\n=VAL \"quoted1\n"
}
},
{
"id": "7Z25",
"name": "bare-document-after-document-end-marker",
"label": "Bare document after document end marker",
"error": false,
"tags": [
"footer"
],
"files": {
"in_yaml": "---\nscalar1\n...\nkey: value\n",
"in_json": "\"scalar1\"\n{\n \"key\": \"value\"\n}\n",
"out_yaml": "--- scalar1\n...\nkey: value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :scalar1\n-DOC ...\n+DOC\n+MAP\n=VAL :key\n=VAL :value\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "H2RW",
"name": "blank-lines",
"label": "Blank lines",
"error": false,
"tags": [
"comment",
"scalar"
],
"files": {
"in_yaml": "foo: 1\n\nbar: 2\n \ntext: |\n a\n \n b\n\n c\n \n d\n",
"in_json": "{\n \"foo\": 1,\n \"bar\": 2,\n \"text\": \"a\\n \\nb\\n\\nc\\n\\nd\\n\"\n}\n",
"out_yaml": "foo: 1\nbar: 2\ntext: \"a\\n \\nb\\n\\nc\\n\\nd\\n\"\n",
"emit_yaml": "foo: 1\nbar: 2\ntext: |\n a\n \n b\n\n c\n\n d\n",
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n=VAL :1\n=VAL :bar\n=VAL :2\n=VAL :text\n=VAL |a\\n \\nb\\n\\nc\\n\\nd\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "2JQS",
"name": "block-mapping-with-missing-keys",
"label": "Block Mapping with Missing Keys",
"error": false,
"tags": [
"empty",
"mapping"
],
"files": {
"in_yaml": ": a\n: b\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :\n=VAL :a\n=VAL :\n=VAL :b\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "7W2P",
"name": "block-mapping-with-missing-values",
"label": "Block Mapping with Missing Values",
"error": false,
"tags": [
"mapping"
],
"files": {
"in_yaml": "? a\n? b\nc:\n",
"in_json": "{\n \"a\": null,\n \"b\": null,\n \"c\": null\n}\n",
"out_yaml": "a:\nb:\nc:\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n=VAL :\n=VAL :b\n=VAL :\n=VAL :c\n=VAL :\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "JTV5",
"name": "block-mapping-with-multiline-scalars",
"label": "Block Mapping with Multiline Scalars",
"error": false,
"tags": [
"scalar",
"mapping"
],
"files": {
"in_yaml": "? a\n true\n: null\n d\n? e\n 42\n",
"in_json": "{\n \"a true\": \"null d\",\n \"e 42\": null\n}\n",
"out_yaml": "a true: null d\ne 42:\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a true\n=VAL :null d\n=VAL :e 42\n=VAL :\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "93JH",
"name": "block-mappings-in-block-sequence",
"label": "Block Mappings in Block Sequence",
"error": false,
"tags": [
"sequence",
"mapping"
],
"files": {
"in_yaml": " - key: value\n key2: value2\n -\n key3: value3\n",
"in_json": "[\n {\n \"key\": \"value\",\n \"key2\": \"value2\"\n },\n {\n \"key3\": \"value3\"\n }\n]\n",
"out_yaml": "- key: value\n key2: value2\n- key3: value3\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :key\n=VAL :value\n=VAL :key2\n=VAL :value2\n-MAP\n+MAP\n=VAL :key3\n=VAL :value3\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "D83L",
"name": "block-scalar-indicator-order",
"label": "Block scalar indicator order",
"error": false,
"tags": [
"literal"
],
"files": {
"in_yaml": "- |2-\n explicit indent and chomp\n- |-2\n chomp and explicit indent\n",
"in_json": "[\n \"explicit indent and chomp\",\n \"chomp and explicit indent\"\n]\n",
"out_yaml": "- |-\n explicit indent and chomp\n- |-\n chomp and explicit indent\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL |explicit indent and chomp\n=VAL |chomp and explicit indent\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "6FWR",
"name": "block-scalar-keep",
"label": "Block Scalar Keep",
"error": false,
"tags": [
"scalar"
],
"files": {
"in_yaml": "--- |+\n ab\n \n \n...\n",
"in_json": "\"ab\\n\\n \\n\"\n",
"out_yaml": "\"ab\\n\\n \\n\"\n...\n",
"emit_yaml": "--- |\n ab\n\n \n...\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL |ab\\n\\n \\n\n-DOC ...\n-STR\n"
}
},
{
"id": "MYW6",
"name": "block-scalar-strip",
"label": "Block Scalar Strip",
"error": false,
"tags": [
"1.3-err",
"scalar"
],
"files": {
"in_yaml": "|-\n ab\n \n \n...\n",
"in_json": "\"ab\"\n",
"out_yaml": "|-\n ab\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL |ab\n-DOC ...\n-STR\n"
}
},
{
"id": "753E",
"name": "block-scalar-strip-1-3",
"label": "Block Scalar Strip [1.3]",
"error": false,
"tags": [
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "--- |-\n ab\n \n \n...\n",
"in_json": "\"ab\"\n",
"out_yaml": "--- |-\n ab\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL |ab\n-DOC ...\n-STR\n"
}
},
{
"id": "S98Z",
"name": "block-scalar-with-spaces-only",
"label": "Block scalar with spaces only",
"error": false,
"tags": [
"comment",
"whitespace",
"scalar",
"folded"
],
"files": {
"in_yaml": "empty block scalar: >\n \n \n \n # comment\n",
"in_json": "{\n \"empty block scalar\": \"\"\n}\n",
"out_yaml": "empty block scalar: \"\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :empty block scalar\n=VAL >\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "5LLU",
"name": "block-scalar-with-wrong-indented-line-after-spaces-only",
"label": "Block scalar with wrong indented line after spaces only",
"error": true,
"tags": [
"error",
"whitespace",
"folded"
],
"files": {
"in_yaml": "block scalar: >\n \n \n \n invalid\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :block scalar\n=VAL >\n"
}
},
{
"id": "8QBE",
"name": "block-sequence-in-block-mapping",
"label": "Block Sequence in Block Mapping",
"error": false,
"tags": [
"sequence",
"mapping"
],
"files": {
"in_yaml": "key:\n - item1\n - item2\n",
"in_json": "{\n \"key\": [\n \"item1\",\n \"item2\"\n ]\n}\n",
"out_yaml": "key:\n- item1\n- item2\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n+SEQ\n=VAL :item1\n=VAL :item2\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "3ALJ",
"name": "block-sequence-in-block-sequence",
"label": "Block Sequence in Block Sequence",
"error": false,
"tags": [
"sequence"
],
"files": {
"in_yaml": "- - s1_i1\n - s1_i2\n- s2\n",
"in_json": "[\n [\n \"s1_i1\",\n \"s1_i2\"\n ],\n \"s2\"\n]\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+SEQ\n=VAL :s1_i1\n=VAL :s1_i2\n-SEQ\n=VAL :s2\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "KMK3",
"name": "block-submapping",
"label": "Block Submapping",
"error": false,
"tags": [
"mapping"
],
"files": {
"in_yaml": "foo:\n bar: 1\nbaz: 2\n",
"in_json": "{\n \"foo\": {\n \"bar\": 1\n },\n \"baz\": 2\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n+MAP\n=VAL :bar\n=VAL :1\n-MAP\n=VAL :baz\n=VAL :2\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "K3WX",
"name": "colon-and-adjacent-value-after-comment-on-next-line",
"label": "Colon and adjacent value after comment on next line",
"error": false,
"tags": [
"words",
"tag"
],
"files": {
"in_yaml": "---\n{ \"foo\" # comment\n :bar }\n",
"in_json": "{\n \"foo\": \"bar\"\n}\n",
"out_yaml": "---\n\"foo\": bar\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL \"foo\n=VAL :bar\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "5MUD",
"name": "colon-and-adjacent-value-on-next-line",
"label": "Colon and adjacent value on next line",
"error": false,
"tags": [
"flow",
"double",
"mapping"
],
"files": {
"in_yaml": "---\n{ \"foo\"\n :bar }\n",
"in_json": "{\n \"foo\": \"bar\"\n}\n",
"out_yaml": "---\n\"foo\": bar\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL \"foo\n=VAL :bar\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "S7BG",
"name": "colon-followed-by-comma",
"label": "Colon followed by comma",
"error": false,
"tags": [
"scalar"
],
"files": {
"in_yaml": "---\n- :,\n",
"in_json": "[\n \":,\"\n]\n",
"out_yaml": "---\n- :,\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL ::,\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "4UYU",
"name": "colon-in-double-quoted-string",
"label": "Colon in Double Quoted String",
"error": false,
"tags": [
"1.3-err",
"scalar"
],
"files": {
"in_yaml": "\"foo: bar\\\": baz\"\n",
"in_json": "\"foo: bar\\\": baz\"\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL \"foo: bar\": baz\n-DOC\n-STR\n"
}
},
{
"id": "QT73",
"name": "comment-and-document-end-marker",
"label": "Comment and document-end marker",
"error": false,
"tags": [
"footer",
"comment"
],
"files": {
"in_yaml": "# comment\n...\n",
"in_json": "",
"out_yaml": "",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n-STR\n"
}
},
{
"id": "BS4K",
"name": "comment-between-plain-scalar-lines",
"label": "Comment between plain scalar lines",
"error": true,
"tags": [
"error"
],
"files": {
"in_yaml": "word1 # comment\nword2\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL :word1\n-DOC\n"
}
},
{
"id": "7TMG",
"name": "comment-in-flow-sequence-before-comma",
"label": "Comment in flow sequence before comma",
"error": false,
"tags": [
"flow",
"comment",
"mapping"
],
"files": {
"in_yaml": "---\n[ word1\n# comment\n, word2]\n",
"in_json": "[\n \"word1\",\n \"word2\"\n]\n",
"out_yaml": "---\n- word1\n- word2\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL :word1\n=VAL :word2\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "8XDJ",
"name": "comment-in-plain-multiline-value",
"label": "Comment in plain multiline value",
"error": true,
"tags": [
"error",
"comment",
"scalar"
],
"files": {
"in_yaml": "key: word1\n# xxx\n word2\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n=VAL :word1\n"
}
},
{
"id": "GDY7",
"name": "comment-that-looks-like-a-mapping-key",
"label": "Comment that looks like a mapping key",
"error": true,
"tags": [
"error",
"comment",
"mapping"
],
"files": {
"in_yaml": "key: value\nthis is #not a: key\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n=VAL :value\n"
}
},
{
"id": "X4QW",
"name": "comment-without-whitespace-after-block-scalar-indicator",
"label": "Comment without whitespace after block scalar indicator",
"error": true,
"tags": [
"error",
"comment",
"whitespace",
"block"
],
"files": {
"in_yaml": "block: ># comment\n scalar\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :block\n"
}
},
{
"id": "SU5Z",
"name": "comment-without-whitespace-after-doublequoted-scalar",
"label": "Comment without whitespace after doublequoted scalar",
"error": true,
"tags": [
"error",
"comment",
"whitespace",
"double"
],
"files": {
"in_yaml": "key: \"value\"# invalid comment\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n=VAL \"value\n"
}
},
{
"id": "565N",
"name": "construct-binary",
"label": "Construct Binary",
"error": false,
"tags": [
"jayt"
],
"files": {
"in_yaml": "canonical: !!binary \"\\\n R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\\\n OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\\\n +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\\\n AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=\"\ngeneric: !!binary |\n R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\n OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\n +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\n AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=\ndescription:\n The binary value above is a tiny arrow encoded as a gif image.\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :canonical\n=VAL <tag:yaml.org,2002:binary> \"R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLCAgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=\n=VAL :generic\n=VAL <tag:yaml.org,2002:binary> |R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\\nOTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\\n+f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\\nAgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=\\n\n=VAL :description\n=VAL :The binary value above is a tiny arrow encoded as a gif image.\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "B63P",
"name": "directive-without-document",
"label": "Directive without document",
"error": true,
"tags": [
"error",
"directive",
"document"
],
"files": {
"in_yaml": "%YAML 1.2\n...\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n"
}
},
{
"id": "HWV9",
"name": "document-end-marker",
"label": "Document-end marker",
"error": false,
"tags": [
"footer"
],
"files": {
"in_yaml": "...\n",
"in_json": "",
"out_yaml": "",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n-STR\n"
}
},
{
"id": "PUW8",
"name": "document-start-on-last-line",
"label": "Document start on last line",
"error": false,
"tags": [
"header"
],
"files": {
"in_yaml": "---\na: b\n---\n",
"in_json": "{\n \"a\": \"b\"\n}\nnull\n",
"out_yaml": "---\na: b\n---\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :a\n=VAL :b\n-MAP\n-DOC\n+DOC ---\n=VAL :\n-DOC\n-STR\n"
}
},
{
"id": "S4T7",
"name": "document-with-footer",
"label": "Document with footer",
"error": false,
"tags": [
"footer",
"mapping"
],
"files": {
"in_yaml": "aaa: bbb\n...\n",
"in_json": "{\n \"aaa\": \"bbb\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :aaa\n=VAL :bbb\n-MAP\n-DOC ...\n-STR\n"
}
},
{
"id": "HRE5",
"name": "double-quoted-scalar-with-escaped-single-quote",
"label": "Double quoted scalar with escaped single quote",
"error": true,
"tags": [
"error",
"single",
"double"
],
"files": {
"in_yaml": "---\ndouble: \"quoted \\' scalar\"\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :double\n"
}
},
{
"id": "CQ3W",
"name": "double-quoted-string-without-closing-quote",
"label": "Double quoted string without closing quote",
"error": true,
"tags": [
"error",
"double"
],
"files": {
"in_yaml": "---\nkey: \"missing closing quote\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :key\n"
}
},
{
"id": "CPZ3",
"name": "doublequoted-scalar-starting-with-a-tab",
"label": "Doublequoted scalar starting with a tab",
"error": false,
"tags": [
"scalar",
"double"
],
"files": {
"in_yaml": "---\ntab: \"\\tstring\"\n",
"in_json": "{\n \"tab\": \"\\tstring\"\n}\n",
"out_yaml": "---\ntab: \"\\tstring\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :tab\n=VAL \"\\tstring\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "SF5V",
"name": "duplicate-yaml-directive",
"label": "Duplicate YAML directive",
"error": true,
"tags": [
"error",
"directive"
],
"files": {
"in_yaml": "%YAML 1.2\n%YAML 1.2\n---\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n"
}
},
{
"id": "7ZZ5",
"name": "empty-flow-collections",
"label": "Empty flow collections",
"error": false,
"tags": [
"sequence",
"flow",
"mapping"
],
"files": {
"in_yaml": "---\nnested sequences:\n- - - []\n- - - {}\nkey1: []\nkey2: {}\n",
"in_json": "{\n \"nested sequences\": [\n [\n [\n []\n ]\n ],\n [\n [\n {}\n ]\n ]\n ],\n \"key1\": [],\n \"key2\": {}\n}\n",
"out_yaml": "---\nnested sequences:\n- - - []\n- - - {}\nkey1: []\nkey2: {}\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :nested sequences\n+SEQ\n+SEQ\n+SEQ\n+SEQ\n-SEQ\n-SEQ\n-SEQ\n+SEQ\n+SEQ\n+MAP\n-MAP\n-SEQ\n-SEQ\n-SEQ\n=VAL :key1\n+SEQ\n-SEQ\n=VAL :key2\n+MAP\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "NHX8",
"name": "empty-lines-at-end-of-document",
"label": "Empty Lines at End of Document",
"error": false,
"tags": [
"whitespace"
],
"files": {
"in_yaml": ":\n\n\n\n",
"in_json": "{\n \"\": null\n}\n",
"out_yaml": null,
"emit_yaml": ":\n",
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :\n=VAL :\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "J7VC",
"name": "empty-lines-between-mapping-elements",
"label": "Empty Lines Between Mapping Elements",
"error": false,
"tags": [
"whitespace",
"mapping"
],
"files": {
"in_yaml": "1: 2\n\n\n3: 4\n",
"in_json": "{\n \"1\": 2,\n \"3\": 4\n}\n",
"out_yaml": "1: 2\n3: 4\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :1\n=VAL :2\n=VAL :3\n=VAL :4\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "AVM7",
"name": "empty-stream",
"label": "Empty Stream",
"error": false,
"tags": [
"edge"
],
"files": {
"in_yaml": "",
"in_json": "",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n-STR\n"
}
},
{
"id": "3UYS",
"name": "escaped-slash-in-double-quotes",
"label": "Escaped slash in double quotes",
"error": false,
"tags": [
"double"
],
"files": {
"in_yaml": "escaped slash: \"a\\/b\"\n",
"in_json": "{\n \"escaped slash\": \"a/b\"\n}\n",
"out_yaml": "escaped slash: \"a/b\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :escaped slash\n=VAL \"a/b\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "X8DW",
"name": "explicit-key-and-value-seperated-by-comment",
"label": "Explicit key and value seperated by comment",
"error": false,
"tags": [
"comment",
"mapping"
],
"files": {
"in_yaml": "---\n? key\n# comment\n: value\n",
"in_json": "{\n \"key\": \"value\"\n}\n",
"out_yaml": "---\nkey: value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :key\n=VAL :value\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "8MK2",
"name": "explicit-non-specific-tag",
"label": "Explicit Non-Specific Tag",
"error": false,
"tags": [
"1.3-err",
"tag"
],
"files": {
"in_yaml": "! a\n",
"in_json": "\"a\"\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL <!> :a\n-DOC\n-STR\n"
}
},
{
"id": "52DL",
"name": "explicit-non-specific-tag-1-3",
"label": "Explicit Non-Specific Tag [1.3]",
"error": false,
"tags": [
"tag",
"1.3-mod"
],
"files": {
"in_yaml": "---\n! a\n",
"in_json": "\"a\"\n",
"out_yaml": "--- ! a\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL <!> :a\n-DOC\n-STR\n"
}
},
{
"id": "54T7",
"name": "flow-mapping",
"label": "Flow Mapping",
"error": false,
"tags": [
"flow",
"mapping"
],
"files": {
"in_yaml": "{foo: you, bar: far}\n",
"in_json": "{\n \"foo\": \"you\",\n \"bar\": \"far\"\n}\n",
"out_yaml": "foo: you\nbar: far\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n=VAL :you\n=VAL :bar\n=VAL :far\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "4MUZ",
"name": "flow-mapping-colon-on-line-after-key",
"label": "Flow mapping colon on line after key",
"error": false,
"tags": [
"mapping"
],
"files": {
"in_yaml": "{\"foo\"\n: \"bar\"}\n",
"in_json": "{\n \"foo\": \"bar\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL \"foo\n=VAL \"bar\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "MXS3",
"name": "flow-mapping-in-block-sequence",
"label": "Flow Mapping in Block Sequence",
"error": false,
"tags": [
"sequence",
"flow",
"mapping"
],
"files": {
"in_yaml": "- {a: b}\n",
"in_json": "[\n {\n \"a\": \"b\"\n }\n]\n",
"out_yaml": "- a: b\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :a\n=VAL :b\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "C2SP",
"name": "flow-mapping-key-on-two-lines",
"label": "Flow Mapping Key on two lines",
"error": true,
"tags": [
"error",
"flow",
"mapping"
],
"files": {
"in_yaml": "[23\n]: 42\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :23\n"
}
},
{
"id": "T833",
"name": "flow-mapping-missing-a-separating-comma",
"label": "Flow mapping missing a separating comma",
"error": true,
"tags": [
"error",
"flow",
"mapping"
],
"files": {
"in_yaml": "---\n{\n foo: 1\n bar: 2 }\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :foo\n"
}
},
{
"id": "DHP8",
"name": "flow-sequence",
"label": "Flow Sequence",
"error": false,
"tags": [
"sequence",
"flow"
],
"files": {
"in_yaml": "[foo, bar, 42]\n",
"in_json": "[\n \"foo\",\n \"bar\",\n 42\n]\n",
"out_yaml": "- foo\n- bar\n- 42\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :foo\n=VAL :bar\n=VAL :42\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "D88J",
"name": "flow-sequence-in-block-mapping",
"label": "Flow Sequence in Block Mapping",
"error": false,
"tags": [
"sequence",
"flow",
"mapping"
],
"files": {
"in_yaml": "a: [b, c]\n",
"in_json": "{\n \"a\": [\n \"b\",\n \"c\"\n ]\n}\n",
"out_yaml": "a:\n- b\n- c\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n+SEQ\n=VAL :b\n=VAL :c\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "SBG9",
"name": "flow-sequence-in-flow-mapping",
"label": "Flow Sequence in Flow Mapping",
"error": false,
"tags": [
"sequence",
"flow",
"mapping"
],
"files": {
"in_yaml": "{a: [b, c], [d, e]: f}\n",
"in_json": null,
"out_yaml": "a:\n- b\n- c\n? - d\n - e\n: f\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n+SEQ\n=VAL :b\n=VAL :c\n-SEQ\n+SEQ\n=VAL :d\n=VAL :e\n-SEQ\n=VAL :f\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "FUP4",
"name": "flow-sequence-in-flow-sequence",
"label": "Flow Sequence in Flow Sequence",
"error": false,
"tags": [
"sequence",
"flow"
],
"files": {
"in_yaml": "[a, [b, c]]\n",
"in_json": "[\n \"a\",\n [\n \"b\",\n \"c\"\n ]\n]\n",
"out_yaml": "- a\n- - b\n - c\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :a\n+SEQ\n=VAL :b\n=VAL :c\n-SEQ\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "9MAG",
"name": "flow-sequence-with-invalid-comma-at-the-beginning",
"label": "Flow sequence with invalid comma at the beginning",
"error": true,
"tags": [
"error",
"flow"
],
"files": {
"in_yaml": "---\n[ , a, b, c ]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n"
}
},
{
"id": "4H7K",
"name": "flow-sequence-with-invalid-extra-closing-bracket",
"label": "Flow sequence with invalid extra closing bracket",
"error": true,
"tags": [
"error",
"flow"
],
"files": {
"in_yaml": "---\n[ a, b, c ] ]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL :a\n=VAL :b\n=VAL :c\n-SEQ\n-DOC\n"
}
},
{
"id": "CTN5",
"name": "flow-sequence-with-invalid-extra-comma",
"label": "Flow sequence with invalid extra comma",
"error": true,
"tags": [
"error",
"flow"
],
"files": {
"in_yaml": "---\n[ a, b, c, , ]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL :a\n=VAL :b\n=VAL :c\n"
}
},
{
"id": "6JTT",
"name": "flow-sequence-without-closing-bracket",
"label": "Flow sequence without closing bracket",
"error": true,
"tags": [
"error",
"flow"
],
"files": {
"in_yaml": "---\n[ [ a, b, c ]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n+SEQ\n=VAL :a\n=VAL :b\n=VAL :c\n-SEQ\n"
}
},
{
"id": "TS54",
"name": "folded-block-scalar",
"label": "Folded Block Scalar",
"error": false,
"tags": [
"1.3-err",
"scalar"
],
"files": {
"in_yaml": ">\n ab\n cd\n \n ef\n\n\n gh\n",
"in_json": "\"ab cd\\nef\\n\\ngh\\n\"\n",
"out_yaml": ">\n ab cd\n\n ef\n\n\n gh\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL >ab cd\\nef\\n\\ngh\\n\n-DOC\n-STR\n"
}
},
{
"id": "4Q9F",
"name": "folded-block-scalar-1-3",
"label": "Folded Block Scalar [1.3]",
"error": false,
"tags": [
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "--- >\n ab\n cd\n \n ef\n\n\n gh\n",
"in_json": "\"ab cd\\nef\\n\\ngh\\n\"\n",
"out_yaml": "--- >\n ab cd\n\n ef\n\n\n gh\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL >ab cd\\nef\\n\\ngh\\n\n-DOC\n-STR\n"
}
},
{
"id": "LX3P",
"name": "implicit-flow-mapping-key-on-one-line",
"label": "Implicit Flow Mapping Key on one line",
"error": false,
"tags": [
"sequence",
"flow",
"1.3-err",
"mapping"
],
"files": {
"in_yaml": "[flow]: block\n",
"in_json": null,
"out_yaml": "? - flow\n: block\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n+SEQ\n=VAL :flow\n-SEQ\n=VAL :block\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "DK4H",
"name": "implicit-key-followed-by-newline",
"label": "Implicit key followed by newline",
"error": true,
"tags": [
"sequence",
"error",
"flow",
"mapping"
],
"files": {
"in_yaml": "---\n[ key\n : value ]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL :key\n"
}
},
{
"id": "ZXT5",
"name": "implicit-key-followed-by-newline-and-adjacent-value",
"label": "Implicit key followed by newline and adjacent value",
"error": true,
"tags": [
"sequence",
"error",
"flow",
"mapping"
],
"files": {
"in_yaml": "[ \"key\"\n :value ]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL \"key\n"
}
},
{
"id": "G9HC",
"name": "invalid-anchor-in-zero-indented-sequence",
"label": "Invalid anchor in zero indented sequence",
"error": true,
"tags": [
"sequence",
"error",
"anchor"
],
"files": {
"in_yaml": "---\nseq:\n&anchor\n- a\n- b\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :seq\n"
}
},
{
"id": "62EZ",
"name": "invalid-block-mapping-key-on-same-line-as-previous-key",
"label": "Invalid block mapping key on same line as previous key",
"error": true,
"tags": [
"error",
"mapping"
],
"files": {
"in_yaml": "---\nx: { y: z }in: valid\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :x\n+MAP\n=VAL :y\n=VAL :z\n-MAP\n"
}
},
{
"id": "CVW2",
"name": "invalid-comment-after-comma",
"label": "Invalid comment after comma",
"error": true,
"tags": [
"sequence",
"error",
"flow",
"comment"
],
"files": {
"in_yaml": "---\n[ a, b, c,#invalid\n]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL :a\n=VAL :b\n=VAL :c\n"
}
},
{
"id": "9JBA",
"name": "invalid-comment-after-end-of-flow-sequence",
"label": "Invalid comment after end of flow sequence",
"error": true,
"tags": [
"sequence",
"error",
"flow",
"comment"
],
"files": {
"in_yaml": "---\n[ a, b, c, ]#invalid\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL :a\n=VAL :b\n=VAL :c\n-SEQ\n"
}
},
{
"id": "3HFZ",
"name": "invalid-content-after-document-end-marker",
"label": "Invalid content after document end marker",
"error": true,
"tags": [
"error",
"footer"
],
"files": {
"in_yaml": "---\nkey: value\n... invalid\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :key\n=VAL :value\n-MAP\n-DOC ...\n"
}
},
{
"id": "RXY3",
"name": "invalid-document-end-marker-in-single-quoted-string",
"label": "Invalid document-end marker in single quoted string",
"error": true,
"tags": [
"error",
"footer",
"single"
],
"files": {
"in_yaml": "---\n'\n...\n'\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n"
}
},
{
"id": "N782",
"name": "invalid-document-markers-in-flow-style",
"label": "Invalid document markers in flow style",
"error": true,
"tags": [
"error",
"footer",
"flow",
"header",
"edge"
],
"files": {
"in_yaml": "[\n--- ,\n...\n]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n"
}
},
{
"id": "5TRB",
"name": "invalid-document-start-marker-in-doublequoted-tring",
"label": "Invalid document-start marker in doublequoted tring",
"error": true,
"tags": [
"error",
"header",
"double"
],
"files": {
"in_yaml": "---\n\"\n---\n\"\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n"
}
},
{
"id": "55WF",
"name": "invalid-escape-in-double-quoted-string",
"label": "Invalid escape in double quoted string",
"error": true,
"tags": [
"error",
"double"
],
"files": {
"in_yaml": "---\n\"\\.\"\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n"
}
},
{
"id": "KS4U",
"name": "invalid-item-after-end-of-flow-sequence",
"label": "Invalid item after end of flow sequence",
"error": true,
"tags": [
"sequence",
"error",
"flow"
],
"files": {
"in_yaml": "---\n[\nsequence item\n]\ninvalid item\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL :sequence item\n-SEQ\n"
}
},
{
"id": "BD7L",
"name": "invalid-mapping-after-sequence",
"label": "Invalid mapping after sequence",
"error": true,
"tags": [
"sequence",
"error",
"mapping"
],
"files": {
"in_yaml": "- item1\n- item2\ninvalid: x\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :item1\n=VAL :item2\n"
}
},
{
"id": "2CMS",
"name": "invalid-mapping-in-plain-multiline",
"label": "Invalid mapping in plain multiline",
"error": true,
"tags": [
"error",
"mapping"
],
"files": {
"in_yaml": "this\n is\n invalid: x\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n"
}
},
{
"id": "HU3P",
"name": "invalid-mapping-in-plain-scalar",
"label": "Invalid Mapping in plain scalar",
"error": true,
"tags": [
"error",
"scalar",
"mapping"
],
"files": {
"in_yaml": "key:\n word1 word2\n no: key\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n"
}
},
{
"id": "ZCZ6",
"name": "invalid-mapping-in-plain-single-line-value",
"label": "Invalid mapping in plain single line value",
"error": true,
"tags": [
"error",
"scalar",
"mapping"
],
"files": {
"in_yaml": "a: b: c: d\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n"
}
},
{
"id": "ZL4Z",
"name": "invalid-nested-mapping",
"label": "Invalid nested mapping",
"error": true,
"tags": [
"error",
"mapping"
],
"files": {
"in_yaml": "---\na: 'b': c\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :a\n=VAL 'b\n"
}
},
{
"id": "TD5N",
"name": "invalid-scalar-after-sequence",
"label": "Invalid scalar after sequence",
"error": true,
"tags": [
"sequence",
"error",
"scalar"
],
"files": {
"in_yaml": "- item1\n- item2\ninvalid\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :item1\n=VAL :item2\n"
}
},
{
"id": "9CWY",
"name": "invalid-scalar-at-the-end-of-mapping",
"label": "Invalid scalar at the end of mapping",
"error": true,
"tags": [
"sequence",
"error",
"mapping"
],
"files": {
"in_yaml": "key:\n - item1\n - item2\ninvalid\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n+SEQ\n=VAL :item1\n=VAL :item2\n-SEQ\n"
}
},
{
"id": "6S55",
"name": "invalid-scalar-at-the-end-of-sequence",
"label": "Invalid scalar at the end of sequence",
"error": true,
"tags": [
"sequence",
"error",
"mapping"
],
"files": {
"in_yaml": "key:\n - bar\n - baz\n invalid\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n+SEQ\n=VAL :bar\n=VAL :baz\n"
}
},
{
"id": "P2EQ",
"name": "invalid-sequene-item-on-same-line-as-previous-item",
"label": "Invalid sequene item on same line as previous item",
"error": true,
"tags": [
"sequence",
"error"
],
"files": {
"in_yaml": "---\n- { y: z }- invalid\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n+MAP\n=VAL :y\n=VAL :z\n-MAP\n"
}
},
{
"id": "4EJS",
"name": "invalid-tabs-as-indendation-in-a-mapping",
"label": "Invalid tabs as indendation in a mapping",
"error": true,
"tags": [
"error",
"whitespace",
"mapping"
],
"files": {
"in_yaml": "---\na:\n\tb:\n\t\tc: value\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :a\n"
}
},
{
"id": "LHL4",
"name": "invalid-tag",
"label": "Invalid tag",
"error": true,
"tags": [
"error",
"tag"
],
"files": {
"in_yaml": "---\n!invalid{}tag scalar\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n"
}
},
{
"id": "S4GJ",
"name": "invalid-text-after-block-scalar-indicator",
"label": "Invalid text after block scalar indicator",
"error": true,
"tags": [
"error",
"folded"
],
"files": {
"in_yaml": "---\nfolded: > first line\n second line\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :folded\n"
}
},
{
"id": "236B",
"name": "invalid-value-after-mapping",
"label": "Invalid value after mapping",
"error": true,
"tags": [
"error",
"mapping"
],
"files": {
"in_yaml": "foo:\n bar\ninvalid\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n=VAL :bar\n"
}
},
{
"id": "ZWK4",
"name": "key-with-anchor-after-missing-explicit-mapping-value",
"label": "Key with anchor after missing explicit mapping value",
"error": false,
"tags": [
"anchor",
"mapping"
],
"files": {
"in_yaml": "---\na: 1\n? b\n&anchor c: 3\n",
"in_json": "{\n \"a\": 1,\n \"b\": null,\n \"c\": 3\n}\n",
"out_yaml": "---\na: 1\nb:\n&anchor c: 3\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :a\n=VAL :1\n=VAL :b\n=VAL :\n=VAL &anchor :c\n=VAL :3\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "M29M",
"name": "literal-block-scalar",
"label": "Literal Block Scalar",
"error": false,
"tags": [
"scalar"
],
"files": {
"in_yaml": "a: |\n ab\n \n cd\n ef\n \n\n...\n",
"in_json": "{\n \"a\": \"ab\\n\\ncd\\nef\\n\"\n}\n",
"out_yaml": "a: |\n ab\n\n cd\n ef\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n=VAL |ab\\n\\ncd\\nef\\n\n-MAP\n-DOC ...\n-STR\n"
}
},
{
"id": "W9L4",
"name": "literal-block-scalar-with-more-spaces-in-first-line",
"label": "Literal block scalar with more spaces in first line",
"error": true,
"tags": [
"error",
"whitespace",
"literal"
],
"files": {
"in_yaml": "---\nblock scalar: |\n \n more spaces at the beginning\n are invalid\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :block scalar\n"
}
},
{
"id": "H3Z8",
"name": "literal-unicode",
"label": "Literal unicode",
"error": false,
"tags": [
"mapping"
],
"files": {
"in_yaml": "---\nwanted: love \u2665 and peace \u262e\n",
"in_json": "{\n \"wanted\": \"love \u2665 and peace \u262e\"\n}\n",
"out_yaml": "---\nwanted: \"love \\u2665 and peace \\u262E\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :wanted\n=VAL :love \u2665 and peace \u262e\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "AZW3",
"name": "lookahead-test-cases",
"label": "Lookahead test cases",
"error": false,
"tags": [
"edge",
"mapping"
],
"files": {
"in_yaml": "- bla\"keks: foo\n- bla]keks: foo\n",
"in_json": "[\n {\n \"bla\\\"keks\": \"foo\"\n },\n {\n \"bla]keks\": \"foo\"\n }\n]\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :bla\"keks\n=VAL :foo\n-MAP\n+MAP\n=VAL :bla]keks\n=VAL :foo\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "6BFJ",
"name": "mapping-key-and-flow-sequence-item-anchors",
"label": "Mapping, key and flow sequence item anchors",
"error": false,
"tags": [
"sequence",
"flow",
"anchor",
"mapping"
],
"files": {
"in_yaml": "---\n&mapping\n&key [ &item a, b, c ]: value\n",
"in_json": null,
"out_yaml": "--- &mapping\n? &key\n- &item a\n- b\n- c\n: value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP &mapping\n+SEQ &key\n=VAL &item :a\n=VAL :b\n=VAL :c\n-SEQ\n=VAL :value\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "9KBC",
"name": "mapping-starting-at-line",
"label": "Mapping starting at --- line",
"error": true,
"tags": [
"error",
"header",
"mapping"
],
"files": {
"in_yaml": "--- key1: value1\n key2: value2\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n"
}
},
{
"id": "CXX2",
"name": "mapping-with-anchor-on-document-start-line",
"label": "Mapping with anchor on document start line",
"error": true,
"tags": [
"error",
"header",
"anchor",
"mapping"
],
"files": {
"in_yaml": "--- &anchor a: b\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n"
}
},
{
"id": "7MNF",
"name": "missing-colon",
"label": "Missing colon",
"error": true,
"tags": [
"error",
"mapping"
],
"files": {
"in_yaml": "top1:\n key1: val1\ntop2\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :top1\n+MAP\n=VAL :key1\n=VAL :val1\n-MAP\n"
}
},
{
"id": "CML9",
"name": "missing-comma-in-flow",
"label": "Missing comma in flow",
"error": true,
"tags": [
"error",
"flow",
"comment"
],
"files": {
"in_yaml": "key: [ word1\n# xxx\n word2 ]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n+SEQ\n=VAL :word1\n"
}
},
{
"id": "EB22",
"name": "missing-document-end-marker-before-directive",
"label": "Missing document-end marker before directive",
"error": true,
"tags": [
"error",
"footer",
"directive"
],
"files": {
"in_yaml": "---\nscalar1 # comment\n%YAML 1.2\n---\nscalar2\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :scalar1\n-DOC\n"
}
},
{
"id": "NTY5",
"name": "missing-space-in-yaml-directive",
"label": "Missing space in YAML directive",
"error": true,
"tags": [
"error",
"directive"
],
"files": {
"in_yaml": "%YAML1.2\n---\nkey: value\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n"
}
},
{
"id": "GH63",
"name": "mixed-block-mapping-explicit-to-implicit",
"label": "Mixed Block Mapping (explicit to implicit)",
"error": false,
"tags": [
"mapping"
],
"files": {
"in_yaml": "? a\n: 13\n1.5: d\n",
"in_json": "{\n \"a\": 13,\n \"1.5\": \"d\"\n}\n",
"out_yaml": "a: 13\n1.5: d\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n=VAL :13\n=VAL :1.5\n=VAL :d\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "RR7F",
"name": "mixed-block-mapping-implicit-to-explicit",
"label": "Mixed Block Mapping (implicit to explicit)",
"error": false,
"tags": [
"mapping"
],
"files": {
"in_yaml": "a: 4.2\n? 23\n: d\n",
"in_json": "{\n \"23\": \"d\",\n \"a\": 4.2\n}\n",
"out_yaml": "a: 4.2\n23: d\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n=VAL :4.2\n=VAL :23\n=VAL :d\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "F6MC",
"name": "more-indented-lines-at-the-beginning-of-folded-block-scalars",
"label": "More indented lines at the beginning of folded block scalars",
"error": false,
"tags": [
"whitespace",
"folded"
],
"files": {
"in_yaml": "---\na: >2\n more indented\n regular\nb: >2\n\n\n more indented\n regular\n",
"in_json": "{\n \"a\": \" more indented\\nregular\\n\",\n \"b\": \"\\n\\n more indented\\nregular\\n\"\n}\n",
"out_yaml": null,
"emit_yaml": "---\na: >2\n more indented\n regular\nb: >2\n\n\n more indented\n regular\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :a\n=VAL > more indented\\nregular\\n\n=VAL :b\n=VAL >\\n\\n more indented\\nregular\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "9FMG",
"name": "multi-level-mapping-indent",
"label": "Multi-level Mapping Indent",
"error": false,
"tags": [
"indent",
"mapping"
],
"files": {
"in_yaml": "a:\n b:\n c: d\n e:\n f: g\nh: i\n",
"in_json": "{\n \"a\": {\n \"b\": {\n \"c\": \"d\"\n },\n \"e\": {\n \"f\": \"g\"\n }\n },\n \"h\": \"i\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n+MAP\n=VAL :b\n+MAP\n=VAL :c\n=VAL :d\n-MAP\n=VAL :e\n+MAP\n=VAL :f\n=VAL :g\n-MAP\n-MAP\n=VAL :h\n=VAL :i\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "9SA2",
"name": "multiline-double-quoted-flow-mapping-key",
"label": "Multiline double quoted flow mapping key",
"error": false,
"tags": [
"flow",
"double",
"mapping"
],
"files": {
"in_yaml": "---\n- { \"single line\": value}\n- { \"multi\n line\": value}\n",
"in_json": "[\n {\n \"single line\": \"value\"\n },\n {\n \"multi line\": \"value\"\n }\n]\n",
"out_yaml": "---\n- \"single line\": value\n- \"multi line\": value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n+MAP\n=VAL \"single line\n=VAL :value\n-MAP\n+MAP\n=VAL \"multi line\n=VAL :value\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "7LBH",
"name": "multiline-double-quoted-implicit-keys",
"label": "Multiline double quoted implicit keys",
"error": true,
"tags": [
"error"
],
"files": {
"in_yaml": "\"a\\nb\": 1\n\"c\n d\": 1\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL \"a\\nb\n=VAL :1\n"
}
},
{
"id": "9BXH",
"name": "multiline-doublequoted-flow-mapping-key-without-value",
"label": "Multiline doublequoted flow mapping key without value",
"error": false,
"tags": [
"flow",
"double",
"mapping"
],
"files": {
"in_yaml": "---\n- { \"single line\", a: b}\n- { \"multi\n line\", a: b}\n",
"in_json": "[\n {\n \"single line\": null,\n \"a\": \"b\"\n },\n {\n \"multi line\": null,\n \"a\": \"b\"\n }\n]\n",
"out_yaml": "---\n- \"single line\": \n a: b\n- \"multi line\": \n a: b\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n+MAP\n=VAL \"single line\n=VAL :\n=VAL :a\n=VAL :b\n-MAP\n+MAP\n=VAL \"multi line\n=VAL :\n=VAL :a\n=VAL :b\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "G7JE",
"name": "multiline-implicit-keys",
"label": "Multiline implicit keys",
"error": true,
"tags": [
"error",
"mapping"
],
"files": {
"in_yaml": "a\\nb: 1\nc\n d: 1\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\\\\nb\n=VAL :1\n"
}
},
{
"id": "NJ66",
"name": "multiline-plain-flow-mapping-key",
"label": "Multiline plain flow mapping key",
"error": false,
"tags": [
"flow",
"mapping"
],
"files": {
"in_yaml": "---\n- { single line: value}\n- { multi\n line: value}\n",
"in_json": "[\n {\n \"single line\": \"value\"\n },\n {\n \"multi line\": \"value\"\n }\n]\n",
"out_yaml": "---\n- single line: value\n- multi line: value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n+MAP\n=VAL :single line\n=VAL :value\n-MAP\n+MAP\n=VAL :multi line\n=VAL :value\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "8KB6",
"name": "multiline-plain-flow-mapping-key-without-value",
"label": "Multiline plain flow mapping key without value",
"error": false,
"tags": [
"flow",
"mapping"
],
"files": {
"in_yaml": "---\n- { single line, a: b}\n- { multi\n line, a: b}\n",
"in_json": "[\n {\n \"single line\": null,\n \"a\": \"b\"\n },\n {\n \"multi line\": null,\n \"a\": \"b\"\n }\n]\n",
"out_yaml": "---\n- single line: \n a: b\n- multi line: \n a: b\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n+MAP\n=VAL :single line\n=VAL :\n=VAL :a\n=VAL :b\n-MAP\n+MAP\n=VAL :multi line\n=VAL :\n=VAL :a\n=VAL :b\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "36F6",
"name": "multiline-plain-scalar-with-empty-line",
"label": "Multiline plain scalar with empty line",
"error": false,
"tags": [
"scalar"
],
"files": {
"in_yaml": "---\nplain: a\n b\n\n c\n",
"in_json": "{\n \"plain\": \"a b\\nc\"\n}\n",
"out_yaml": "---\nplain: 'a b\n\n c'\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :plain\n=VAL :a b\\nc\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "NB6Z",
"name": "multiline-plain-value-with-tabs-on-empty-lines",
"label": "Multiline plain value with tabs on empty lines",
"error": false,
"tags": [
"whitespace",
"scalar"
],
"files": {
"in_yaml": "key:\n value\n with\n \t\n tabs\n",
"in_json": "{\n \"key\": \"value with\\ntabs\"\n}\n",
"out_yaml": "key: 'value with\n\n tabs'\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n=VAL :value with\\ntabs\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "9YRD",
"name": "multiline-scalar-at-top-level",
"label": "Multiline Scalar at Top Level",
"error": false,
"tags": [
"1.3-err",
"scalar"
],
"files": {
"in_yaml": "a\nb \n c\nd\n\ne\n",
"in_json": "\"a b c d\\ne\"\n",
"out_yaml": "'a b c d\n\n e'\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL :a b c d\\ne\n-DOC\n-STR\n"
}
},
{
"id": "EX5H",
"name": "multiline-scalar-at-top-level-1-3",
"label": "Multiline Scalar at Top Level [1.3]",
"error": false,
"tags": [
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "---\na\nb \n c\nd\n\ne\n",
"in_json": "\"a b c d\\ne\"\n",
"out_yaml": "'a b c d\n\n e'\n",
"emit_yaml": "--- a b c d\n\ne\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :a b c d\\ne\n-DOC\n-STR\n"
}
},
{
"id": "A984",
"name": "multiline-scalar-in-mapping",
"label": "Multiline Scalar in Mapping",
"error": false,
"tags": [
"scalar"
],
"files": {
"in_yaml": "a: b\n c\nd:\n e\n f\n",
"in_json": "{\n \"a\": \"b c\",\n \"d\": \"e f\"\n}\n",
"out_yaml": "a: b c\nd: e f\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n=VAL :b c\n=VAL :d\n=VAL :e f\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "XLQ9",
"name": "multiline-scalar-that-looks-like-a-yaml-directive",
"label": "Multiline scalar that looks like a YAML directive",
"error": false,
"tags": [
"directive",
"scalar"
],
"files": {
"in_yaml": "---\nscalar\n%YAML 1.2\n",
"in_json": "\"scalar %YAML 1.2\"\n",
"out_yaml": "--- scalar %YAML 1.2\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :scalar %YAML 1.2\n-DOC\n-STR\n"
}
},
{
"id": "D49Q",
"name": "multiline-single-quoted-implicit-keys",
"label": "Multiline single quoted implicit keys",
"error": true,
"tags": [
"error",
"single",
"mapping"
],
"files": {
"in_yaml": "'a\\nb': 1\n'c\n d': 1\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL 'a\\\\nb\n=VAL :1\n"
}
},
{
"id": "K4SU",
"name": "multiple-entry-block-sequence",
"label": "Multiple Entry Block Sequence",
"error": false,
"tags": [
"sequence"
],
"files": {
"in_yaml": "- foo\n- bar\n- 42\n",
"in_json": "[\n \"foo\",\n \"bar\",\n 42\n]\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :foo\n=VAL :bar\n=VAL :42\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "J5UC",
"name": "multiple-pair-block-mapping",
"label": "Multiple Pair Block Mapping",
"error": false,
"tags": [
"mapping"
],
"files": {
"in_yaml": "foo: blue\nbar: arrr\nbaz: jazz\n",
"in_json": "{\n \"foo\": \"blue\",\n \"bar\": \"arrr\",\n \"baz\": \"jazz\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n=VAL :blue\n=VAL :bar\n=VAL :arrr\n=VAL :baz\n=VAL :jazz\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "M7NX",
"name": "nested-flow-collections",
"label": "Nested flow collections",
"error": false,
"tags": [
"sequence",
"flow",
"mapping"
],
"files": {
"in_yaml": "---\n{\n a: [\n b, c, {\n d: [e, f]\n }\n ]\n}\n",
"in_json": "{\n \"a\": [\n \"b\",\n \"c\",\n {\n \"d\": [\n \"e\",\n \"f\"\n ]\n }\n ]\n}\n",
"out_yaml": "---\na:\n- b\n- c\n- d:\n - e\n - f\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :a\n+SEQ\n=VAL :b\n=VAL :c\n+MAP\n=VAL :d\n+SEQ\n=VAL :e\n=VAL :f\n-SEQ\n-MAP\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "F3CP",
"name": "nested-flow-collections-on-one-line",
"label": "Nested flow collections on one line",
"error": false,
"tags": [
"sequence",
"flow",
"mapping"
],
"files": {
"in_yaml": "---\n{ a: [b, c, { d: [e, f] } ] }\n",
"in_json": "{\n \"a\": [\n \"b\",\n \"c\",\n {\n \"d\": [\n \"e\",\n \"f\"\n ]\n }\n ]\n}\n",
"out_yaml": "---\na:\n- b\n- c\n- d:\n - e\n - f\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :a\n+SEQ\n=VAL :b\n=VAL :c\n+MAP\n=VAL :d\n+SEQ\n=VAL :e\n=VAL :f\n-SEQ\n-MAP\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "R52L",
"name": "nested-flow-mapping-sequence-and-mappings",
"label": "Nested flow mapping sequence and mappings",
"error": false,
"tags": [
"sequence",
"flow",
"mapping"
],
"files": {
"in_yaml": "---\n{ top1: [item1, {key2: value2}, item3], top2: value2 }\n",
"in_json": "{\n \"top1\": [\n \"item1\",\n {\n \"key2\": \"value2\"\n },\n \"item3\"\n ],\n \"top2\": \"value2\"\n}\n",
"out_yaml": "---\ntop1:\n- item1\n- key2: value2\n- item3\ntop2: value2\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :top1\n+SEQ\n=VAL :item1\n+MAP\n=VAL :key2\n=VAL :value2\n-MAP\n=VAL :item3\n-SEQ\n=VAL :top2\n=VAL :value2\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "4FJ6",
"name": "nested-implicit-complex-keys",
"label": "Nested implicit complex keys",
"error": false,
"tags": [
"sequence",
"flow",
"mapping"
],
"files": {
"in_yaml": "---\n[\n [ a, [ [[b,c]]: d, e]]: 23\n]\n",
"in_json": null,
"out_yaml": "---\n- ? - a\n - - ? - - b\n - c\n : d\n - e\n : 23\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n+MAP\n+SEQ\n=VAL :a\n+SEQ\n+MAP\n+SEQ\n+SEQ\n=VAL :b\n=VAL :c\n-SEQ\n-SEQ\n=VAL :d\n-MAP\n=VAL :e\n-SEQ\n-SEQ\n=VAL :23\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "ZK9H",
"name": "nested-top-level-flow-mapping",
"label": "Nested top level flow mapping",
"error": false,
"tags": [
"sequence",
"indent",
"flow",
"mapping"
],
"files": {
"in_yaml": "{ key: [[[\n value\n ]]]\n}\n",
"in_json": "{\n \"key\": [\n [\n [\n \"value\"\n ]\n ]\n ]\n}\n",
"out_yaml": "key:\n- - - value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n+SEQ\n+SEQ\n+SEQ\n=VAL :value\n-SEQ\n-SEQ\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "BU8L",
"name": "node-anchor-and-tag-on-seperate-lines",
"label": "Node Anchor and Tag on Seperate Lines",
"error": false,
"tags": [
"indent",
"1.3-err",
"anchor"
],
"files": {
"in_yaml": "key: &anchor\n !!map\n a: b\n",
"in_json": "{\n \"key\": {\n \"a\": \"b\"\n }\n}\n",
"out_yaml": "key: &anchor !!map\n a: b\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n+MAP &anchor <tag:yaml.org,2002:map>\n=VAL :a\n=VAL :b\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "GT5M",
"name": "node-anchor-in-sequence",
"label": "Node anchor in sequence",
"error": true,
"tags": [
"sequence",
"error",
"anchor"
],
"files": {
"in_yaml": "- item1\n&node\n- item2\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :item1\n"
}
},
{
"id": "H7J7",
"name": "node-anchor-not-indented",
"label": "Node anchor not indented",
"error": true,
"tags": [
"error",
"indent",
"anchor"
],
"files": {
"in_yaml": "key: &x\n!!map\n a: b\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n=VAL &x :\n"
}
},
{
"id": "U3XV",
"name": "node-and-mapping-key-anchors",
"label": "Node and Mapping Key Anchors",
"error": false,
"tags": [
"1.3-err",
"comment",
"anchor"
],
"files": {
"in_yaml": "---\ntop1: &node1\n &k1 key1: one\ntop2: &node2 # comment\n key2: two\ntop3:\n &k3 key3: three\ntop4:\n &node4\n &k4 key4: four\ntop5:\n &node5\n key5: five\ntop6: &val6\n six\ntop7:\n &val7 seven\n",
"in_json": "{\n \"top1\": {\n \"key1\": \"one\"\n },\n \"top2\": {\n \"key2\": \"two\"\n },\n \"top3\": {\n \"key3\": \"three\"\n },\n \"top4\": {\n \"key4\": \"four\"\n },\n \"top5\": {\n \"key5\": \"five\"\n },\n \"top6\": \"six\",\n \"top7\": \"seven\"\n}\n",
"out_yaml": "---\ntop1: &node1\n &k1 key1: one\ntop2: &node2\n key2: two\ntop3:\n &k3 key3: three\ntop4: &node4\n &k4 key4: four\ntop5: &node5\n key5: five\ntop6: &val6 six\ntop7: &val7 seven\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :top1\n+MAP &node1\n=VAL &k1 :key1\n=VAL :one\n-MAP\n=VAL :top2\n+MAP &node2\n=VAL :key2\n=VAL :two\n-MAP\n=VAL :top3\n+MAP\n=VAL &k3 :key3\n=VAL :three\n-MAP\n=VAL :top4\n+MAP &node4\n=VAL &k4 :key4\n=VAL :four\n-MAP\n=VAL :top5\n+MAP &node5\n=VAL :key5\n=VAL :five\n-MAP\n=VAL :top6\n=VAL &val6 :six\n=VAL :top7\n=VAL &val7 :seven\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "7BMT",
"name": "node-and-mapping-key-anchors-1-3",
"label": "Node and Mapping Key Anchors [1.3]",
"error": false,
"tags": [
"comment",
"anchor",
"1.3-mod"
],
"files": {
"in_yaml": "---\ntop1: &node1\n &k1 key1: one\ntop2: &node2 # comment\n key2: two\ntop3:\n &k3 key3: three\ntop4: &node4\n &k4 key4: four\ntop5: &node5\n key5: five\ntop6: &val6\n six\ntop7:\n &val7 seven\n",
"in_json": "{\n \"top1\": {\n \"key1\": \"one\"\n },\n \"top2\": {\n \"key2\": \"two\"\n },\n \"top3\": {\n \"key3\": \"three\"\n },\n \"top4\": {\n \"key4\": \"four\"\n },\n \"top5\": {\n \"key5\": \"five\"\n },\n \"top6\": \"six\",\n \"top7\": \"seven\"\n}\n",
"out_yaml": "---\ntop1: &node1\n &k1 key1: one\ntop2: &node2\n key2: two\ntop3:\n &k3 key3: three\ntop4: &node4\n &k4 key4: four\ntop5: &node5\n key5: five\ntop6: &val6 six\ntop7: &val7 seven\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :top1\n+MAP &node1\n=VAL &k1 :key1\n=VAL :one\n-MAP\n=VAL :top2\n+MAP &node2\n=VAL :key2\n=VAL :two\n-MAP\n=VAL :top3\n+MAP\n=VAL &k3 :key3\n=VAL :three\n-MAP\n=VAL :top4\n+MAP &node4\n=VAL &k4 :key4\n=VAL :four\n-MAP\n=VAL :top5\n+MAP &node5\n=VAL :key5\n=VAL :five\n-MAP\n=VAL :top6\n=VAL &val6 :six\n=VAL :top7\n=VAL &val7 :seven\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "MZX3",
"name": "non-specific-tags-on-scalars",
"label": "Non-Specific Tags on Scalars",
"error": false,
"tags": [
"scalar",
"tag"
],
"files": {
"in_yaml": "- plain\n- \"double quoted\"\n- 'single quoted'\n- >\n block\n- plain again\n",
"in_json": "[\n \"plain\",\n \"double quoted\",\n \"single quoted\",\n \"block\\n\",\n \"plain again\"\n]\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :plain\n=VAL \"double quoted\n=VAL 'single quoted\n=VAL >block\\n\n=VAL :plain again\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "8CWC",
"name": "plain-mapping-key-ending-with-colon",
"label": "Plain mapping key ending with colon",
"error": false,
"tags": [
"scalar",
"mapping"
],
"files": {
"in_yaml": "---\nkey ends with two colons::: value\n",
"in_json": "{\n \"key ends with two colons::\": \"value\"\n}\n",
"out_yaml": "---\n'key ends with two colons::': value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :key ends with two colons::\n=VAL :value\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "3MYT",
"name": "plain-scalar-looking-like-key-comment-anchor-and-tag",
"label": "Plain Scalar looking like key, comment, anchor and tag",
"error": false,
"tags": [
"1.3-err",
"scalar"
],
"files": {
"in_yaml": "k:#foo\n &a !t s\n",
"in_json": "\"k:#foo &a !t s\"\n",
"out_yaml": "k:#foo &a !t s\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL :k:#foo &a !t s\n-DOC\n-STR\n"
}
},
{
"id": "JDH8",
"name": "plain-scalar-looking-like-key-comment-anchor-and-tag-1-3",
"label": "Plain Scalar looking like key, comment, anchor and tag [1.3]",
"error": false,
"tags": [
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "---\nk:#foo\n &a !t s\n",
"in_json": "\"k:#foo &a !t s\"\n",
"out_yaml": "---\n\"k:#foo &a !t s\"\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :k:#foo &a !t s\n-DOC\n-STR\n"
}
},
{
"id": "4V8U",
"name": "plain-scalar-with-backslashes",
"label": "Plain scalar with backslashes",
"error": false,
"tags": [
"scalar"
],
"files": {
"in_yaml": "---\nplain\\value\\with\\backslashes\n",
"in_json": "\"plain\\\\value\\\\with\\\\backslashes\"\n",
"out_yaml": "--- plain\\value\\with\\backslashes\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :plain\\\\value\\\\with\\\\backslashes\n-DOC\n-STR\n"
}
},
{
"id": "UDM2",
"name": "plain-url-in-flow-mapping",
"label": "Plain URL in flow mapping",
"error": false,
"tags": [
"flow",
"scalar"
],
"files": {
"in_yaml": "- { url: http://example.org }\n",
"in_json": "[\n {\n \"url\": \"http://example.org\"\n }\n]\n",
"out_yaml": "- url: http://example.org\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :url\n=VAL :http://example.org\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "4JVG",
"name": "scalar-value-with-two-anchors",
"label": "Scalar value with two anchors",
"error": true,
"tags": [
"error",
"anchor"
],
"files": {
"in_yaml": "top1: &node1\n &k1 key1: val1\ntop2: &node2\n &v2 val2\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :top1\n+MAP &node1\n=VAL &k1 :key1\n=VAL :val1\n-MAP\n=VAL :top2\n"
}
},
{
"id": "KSS4",
"name": "scalars-on-line",
"label": "Scalars on --- line",
"error": false,
"tags": [
"1.3-err",
"header",
"anchor",
"scalar"
],
"files": {
"in_yaml": "--- \"quoted\nstring\"\n--- &node foo\n",
"in_json": "\"quoted string\"\n\"foo\"\n",
"out_yaml": "--- \"quoted string\"\n--- &node foo\n...\n",
"emit_yaml": "--- \"quoted string\"\n--- &node foo\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL \"quoted string\n-DOC\n+DOC ---\n=VAL &node :foo\n-DOC\n-STR\n"
}
},
{
"id": "AB8U",
"name": "sequence-entry-that-looks-like-two-with-wrong-indentation",
"label": "Sequence entry that looks like two with wrong indentation",
"error": false,
"tags": [
"sequence"
],
"files": {
"in_yaml": "- single multiline\n - sequence entry\n",
"in_json": "[\n \"single multiline - sequence entry\"\n]\n",
"out_yaml": "- single multiline - sequence entry\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :single multiline - sequence entry\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "RLU9",
"name": "sequence-indent",
"label": "Sequence Indent",
"error": false,
"tags": [
"sequence",
"indent"
],
"files": {
"in_yaml": "foo:\n- 42\nbar:\n - 44\n",
"in_json": "{\n \"foo\": [\n 42\n ],\n \"bar\": [\n 44\n ]\n}\n",
"out_yaml": "foo:\n- 42\nbar:\n- 44\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n+SEQ\n=VAL :42\n-SEQ\n=VAL :bar\n+SEQ\n=VAL :44\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "5U3A",
"name": "sequence-on-same-line-as-mapping-key",
"label": "Sequence on same Line as Mapping Key",
"error": true,
"tags": [
"sequence",
"error",
"mapping"
],
"files": {
"in_yaml": "key: - a\n - b\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n"
}
},
{
"id": "AZ63",
"name": "sequence-with-same-indentation-as-parent-mapping",
"label": "Sequence With Same Indentation as Parent Mapping",
"error": false,
"tags": [
"sequence",
"mapping"
],
"files": {
"in_yaml": "1:\n- 2\n- 3\n4: 5\n",
"in_json": "{\n \"1\": [\n 2,\n 3\n ],\n \"4\": 5\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :1\n+SEQ\n=VAL :2\n=VAL :3\n-SEQ\n=VAL :4\n=VAL :5\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "9J7A",
"name": "simple-mapping-indent",
"label": "Simple Mapping Indent",
"error": false,
"tags": [
"simple",
"indent",
"mapping"
],
"files": {
"in_yaml": "foo:\n bar: baz\n",
"in_json": "{\n \"foo\": {\n \"bar\": \"baz\"\n }\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n+MAP\n=VAL :bar\n=VAL :baz\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "3R3P",
"name": "single-block-sequence-with-anchor",
"label": "Single block sequence with anchor",
"error": false,
"tags": [
"sequence",
"anchor"
],
"files": {
"in_yaml": "&sequence\n- a\n",
"in_json": "[\n \"a\"\n]\n",
"out_yaml": "&sequence\n- a\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ &sequence\n=VAL :a\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "FTA2",
"name": "single-block-sequence-with-anchor-and-explicit-document-start",
"label": "Single block sequence with anchor and explicit document start",
"error": false,
"tags": [
"sequence",
"header",
"anchor"
],
"files": {
"in_yaml": "--- &sequence\n- a\n",
"in_json": "[\n \"a\"\n]\n",
"out_yaml": "--- &sequence\n- a\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ &sequence\n=VAL :a\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "65WH",
"name": "single-entry-block-sequence",
"label": "Single Entry Block Sequence",
"error": false,
"tags": [
"sequence"
],
"files": {
"in_yaml": "- foo\n",
"in_json": "[\n \"foo\"\n]\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :foo\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "D9TU",
"name": "single-pair-block-mapping",
"label": "Single Pair Block Mapping",
"error": false,
"tags": [
"simple",
"mapping"
],
"files": {
"in_yaml": "foo: bar\n",
"in_json": "{\n \"foo\": \"bar\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n=VAL :bar\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "FQ7F",
"name": "spec-example-2-1-sequence-of-scalars",
"label": "Spec Example 2.1. Sequence of Scalars",
"error": false,
"tags": [
"sequence",
"spec"
],
"files": {
"in_yaml": "- Mark McGwire\n- Sammy Sosa\n- Ken Griffey\n",
"in_json": "[\n \"Mark McGwire\",\n \"Sammy Sosa\",\n \"Ken Griffey\"\n]\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": "SEQ-MARK 0 1 1 1\nWS-SPACE 1 1 1 2\nTEXT-VAL 2 12 1 3 :Mark McGwire\nWS-NEWLN 14 1 1 15\nSEQ-MARK 15 1 2 1\nWS-SPACE 1 1 1 2\nTEXT-VAL 2 12 1 3 :Sammy Sosa\nWS-NEWLN 14 1 1 15\n",
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :Mark McGwire\n=VAL :Sammy Sosa\n=VAL :Ken Griffey\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "7BUB",
"name": "spec-example-2-10-node-for-sammy-sosa-appears-twice-in-this-document",
"label": "Spec Example 2.10. Node for \u201cSammy Sosa\u201d appears twice in this document",
"error": false,
"tags": [
"spec",
"alias"
],
"files": {
"in_yaml": "---\nhr:\n - Mark McGwire\n # Following node labeled SS\n - &SS Sammy Sosa\nrbi:\n - *SS # Subsequent occurrence\n - Ken Griffey\n",
"in_json": "{\n \"hr\": [\n \"Mark McGwire\",\n \"Sammy Sosa\"\n ],\n \"rbi\": [\n \"Sammy Sosa\",\n \"Ken Griffey\"\n ]\n}\n",
"out_yaml": "---\nhr:\n- Mark McGwire\n- &SS Sammy Sosa\nrbi:\n- *SS\n- Ken Griffey\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :hr\n+SEQ\n=VAL :Mark McGwire\n=VAL &SS :Sammy Sosa\n-SEQ\n=VAL :rbi\n+SEQ\n=ALI *SS\n=VAL :Ken Griffey\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "M5DY",
"name": "spec-example-2-11-mapping-between-sequences",
"label": "Spec Example 2.11. Mapping between Sequences",
"error": false,
"tags": [
"sequence",
"spec",
"mapping"
],
"files": {
"in_yaml": "? - Detroit Tigers\n - Chicago cubs\n:\n - 2001-07-23\n\n? [ New York Yankees,\n Atlanta Braves ]\n: [ 2001-07-02, 2001-08-12,\n 2001-08-14 ]\n",
"in_json": null,
"out_yaml": "? - Detroit Tigers\n - Chicago cubs\n: - 2001-07-23\n? - New York Yankees\n - Atlanta Braves\n: - 2001-07-02\n - 2001-08-12\n - 2001-08-14\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n+SEQ\n=VAL :Detroit Tigers\n=VAL :Chicago cubs\n-SEQ\n+SEQ\n=VAL :2001-07-23\n-SEQ\n+SEQ\n=VAL :New York Yankees\n=VAL :Atlanta Braves\n-SEQ\n+SEQ\n=VAL :2001-07-02\n=VAL :2001-08-12\n=VAL :2001-08-14\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "9U5K",
"name": "spec-example-2-12-compact-nested-mapping",
"label": "Spec Example 2.12. Compact Nested Mapping",
"error": false,
"tags": [
"sequence",
"spec",
"mapping"
],
"files": {
"in_yaml": "---\n# Products purchased\n- item : Super Hoop\n quantity: 1\n- item : Basketball\n quantity: 4\n- item : Big Shoes\n quantity: 1\n",
"in_json": "[\n {\n \"item\": \"Super Hoop\",\n \"quantity\": 1\n },\n {\n \"item\": \"Basketball\",\n \"quantity\": 4\n },\n {\n \"item\": \"Big Shoes\",\n \"quantity\": 1\n }\n]\n",
"out_yaml": "---\n- item: Super Hoop\n quantity: 1\n- item: Basketball\n quantity: 4\n- item: Big Shoes\n quantity: 1\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n+MAP\n=VAL :item\n=VAL :Super Hoop\n=VAL :quantity\n=VAL :1\n-MAP\n+MAP\n=VAL :item\n=VAL :Basketball\n=VAL :quantity\n=VAL :4\n-MAP\n+MAP\n=VAL :item\n=VAL :Big Shoes\n=VAL :quantity\n=VAL :1\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "6JQW",
"name": "spec-example-2-13-in-literals-newlines-are-preserved",
"label": "Spec Example 2.13. In literals, newlines are preserved",
"error": false,
"tags": [
"comment",
"spec",
"literal",
"scalar"
],
"files": {
"in_yaml": "# ASCII Art\n--- |\n \\//||\\/||\n // || ||__\n",
"in_json": "\"\\\\//||\\\\/||\\n// || ||__\\n\"\n",
"out_yaml": "--- |\n \\//||\\/||\n // || ||__\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL |\\\\//||\\\\/||\\n// || ||__\\n\n-DOC\n-STR\n"
}
},
{
"id": "96L6",
"name": "spec-example-2-14-in-the-folded-scalars-newlines-become-spaces",
"label": "Spec Example 2.14. In the folded scalars, newlines become spaces",
"error": false,
"tags": [
"spec",
"scalar",
"folded"
],
"files": {
"in_yaml": "--- >\n Mark McGwire's\n year was crippled\n by a knee injury.\n",
"in_json": "\"Mark McGwire's year was crippled by a knee injury.\\n\"\n",
"out_yaml": "--- >\n Mark McGwire's year was crippled by a knee injury.\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL >Mark McGwire's year was crippled by a knee injury.\\n\n-DOC\n-STR\n"
}
},
{
"id": "6VJK",
"name": "spec-example-2-15-folded-newlines-are-preserved-for-more-indented-and-blank-lines",
"label": "Spec Example 2.15. Folded newlines are preserved for \"more indented\" and blank lines",
"error": false,
"tags": [
"1.3-err",
"spec",
"scalar",
"folded"
],
"files": {
"in_yaml": ">\n Sammy Sosa completed another\n fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\n What a year!\n",
"in_json": "\"Sammy Sosa completed another fine season with great stats.\\n\\n 63 Home Runs\\n 0.288 Batting Average\\n\\nWhat a year!\\n\"\n",
"out_yaml": ">\n Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\n What a year!\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL >Sammy Sosa completed another fine season with great stats.\\n\\n 63 Home Runs\\n 0.288 Batting Average\\n\\nWhat a year!\\n\n-DOC\n-STR\n"
}
},
{
"id": "HMK4",
"name": "spec-example-2-16-indentation-determines-scope",
"label": "Spec Example 2.16. Indentation determines scope",
"error": false,
"tags": [
"spec",
"literal",
"folded"
],
"files": {
"in_yaml": "name: Mark McGwire\naccomplishment: >\n Mark set a major league\n home run record in 1998.\nstats: |\n 65 Home Runs\n 0.278 Batting Average\n",
"in_json": "{\n \"name\": \"Mark McGwire\",\n \"accomplishment\": \"Mark set a major league home run record in 1998.\\n\",\n \"stats\": \"65 Home Runs\\n0.278 Batting Average\\n\"\n}\n",
"out_yaml": "name: Mark McGwire\naccomplishment: >\n Mark set a major league home run record in 1998.\nstats: |\n 65 Home Runs\n 0.278 Batting Average\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :name\n=VAL :Mark McGwire\n=VAL :accomplishment\n=VAL >Mark set a major league home run record in 1998.\\n\n=VAL :stats\n=VAL |65 Home Runs\\n0.278 Batting Average\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "G4RS",
"name": "spec-example-2-17-quoted-scalars",
"label": "Spec Example 2.17. Quoted Scalars",
"error": false,
"tags": [
"spec",
"scalar"
],
"files": {
"in_yaml": "unicode: \"Sosa did fine.\\u263A\"\ncontrol: \"\\b1998\\t1999\\t2000\\n\"\nhex esc: \"\\x0d\\x0a is \\r\\n\"\n\nsingle: '\"Howdy!\" he cried.'\nquoted: ' # Not a ''comment''.'\ntie-fighter: '|\\-*-/|'\n",
"in_json": "{\n \"unicode\": \"Sosa did fine.\u263a\",\n \"control\": \"\\b1998\\t1999\\t2000\\n\",\n \"hex esc\": \"\\r\\n is \\r\\n\",\n \"single\": \"\\\"Howdy!\\\" he cried.\",\n \"quoted\": \" # Not a 'comment'.\",\n \"tie-fighter\": \"|\\\\-*-/|\"\n}\n",
"out_yaml": "unicode: \"Sosa did fine.\\u263A\"\ncontrol: \"\\b1998\\t1999\\t2000\\n\"\nhex esc: \"\\r\\n is \\r\\n\"\nsingle: '\"Howdy!\" he cried.'\nquoted: ' # Not a ''comment''.'\ntie-fighter: '|\\-*-/|'\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :unicode\n=VAL \"Sosa did fine.\u263a\n=VAL :control\n=VAL \"\\b1998\\t1999\\t2000\\n\n=VAL :hex esc\n=VAL \"\\r\\n is \\r\\n\n=VAL :single\n=VAL '\"Howdy!\" he cried.\n=VAL :quoted\n=VAL ' # Not a 'comment'.\n=VAL :tie-fighter\n=VAL '|\\\\-*-/|\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "4CQQ",
"name": "spec-example-2-18-multi-line-flow-scalars",
"label": "Spec Example 2.18. Multi-line Flow Scalars",
"error": false,
"tags": [
"spec",
"scalar"
],
"files": {
"in_yaml": "plain:\n This unquoted scalar\n spans many lines.\n\nquoted: \"So does this\n quoted scalar.\\n\"\n",
"in_json": "{\n \"plain\": \"This unquoted scalar spans many lines.\",\n \"quoted\": \"So does this quoted scalar.\\n\"\n}\n",
"out_yaml": "plain: This unquoted scalar spans many lines.\nquoted: \"So does this quoted scalar.\\n\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :plain\n=VAL :This unquoted scalar spans many lines.\n=VAL :quoted\n=VAL \"So does this quoted scalar.\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "SYW4",
"name": "spec-example-2-2-mapping-scalars-to-scalars",
"label": "Spec Example 2.2. Mapping Scalars to Scalars",
"error": false,
"tags": [
"comment",
"spec",
"literal",
"scalar"
],
"files": {
"in_yaml": "hr: 65 # Home runs\navg: 0.278 # Batting average\nrbi: 147 # Runs Batted In\n",
"in_json": "{\n \"hr\": 65,\n \"avg\": 0.278,\n \"rbi\": 147\n}\n",
"out_yaml": "hr: 65\navg: 0.278\nrbi: 147\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :hr\n=VAL :65\n=VAL :avg\n=VAL :0.278\n=VAL :rbi\n=VAL :147\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "77H8",
"name": "spec-example-2-23-various-explicit-tags",
"label": "Spec Example 2.23. Various Explicit Tags",
"error": false,
"tags": [
"spec",
"tag"
],
"files": {
"in_yaml": "---\nnot-date: !!str 2002-04-28\n\npicture: !!binary |\n R0lGODlhDAAMAIQAAP//9/X\n 17unp5WZmZgAAAOfn515eXv\n Pz7Y6OjuDg4J+fn5OTk6enp\n 56enmleECcgggoBADs=\n\napplication specific tag: !something |\n The semantics of the tag\n above may be different for\n different documents.\n",
"in_json": null,
"out_yaml": "---\nnot-date: !!str 2002-04-28\npicture: !!binary |\n R0lGODlhDAAMAIQAAP//9/X\n 17unp5WZmZgAAAOfn515eXv\n Pz7Y6OjuDg4J+fn5OTk6enp\n 56enmleECcgggoBADs=\napplication specific tag: !something |\n The semantics of the tag\n above may be different for\n different documents.\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :not-date\n=VAL <tag:yaml.org,2002:str> :2002-04-28\n=VAL :picture\n=VAL <tag:yaml.org,2002:binary> |R0lGODlhDAAMAIQAAP//9/X\\n17unp5WZmZgAAAOfn515eXv\\nPz7Y6OjuDg4J+fn5OTk6enp\\n56enmleECcgggoBADs=\\n\n=VAL :application specific tag\n=VAL <!something> |The semantics of the tag\\nabove may be different for\\ndifferent documents.\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "C4HZ",
"name": "spec-example-2-24-global-tags",
"label": "Spec Example 2.24. Global Tags",
"error": false,
"tags": [
"directive",
"spec",
"alias",
"tag"
],
"files": {
"in_yaml": "%TAG ! tag:clarkevans.com,2002:\n--- !shape\n # Use the ! handle for presenting\n # tag:clarkevans.com,2002:circle\n- !circle\n center: &ORIGIN {x: 73, y: 129}\n radius: 7\n- !line\n start: *ORIGIN\n finish: { x: 89, y: 102 }\n- !label\n start: *ORIGIN\n color: 0xFFEEBB\n text: Pretty vector drawing.\n",
"in_json": null,
"out_yaml": "--- !<tag:clarkevans.com,2002:shape>\n- !<tag:clarkevans.com,2002:circle>\n center: &ORIGIN\n x: 73\n y: 129\n radius: 7\n- !<tag:clarkevans.com,2002:line>\n start: *ORIGIN\n finish:\n x: 89\n y: 102\n- !<tag:clarkevans.com,2002:label>\n start: *ORIGIN\n color: 0xFFEEBB\n text: Pretty vector drawing.\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ <tag:clarkevans.com,2002:shape>\n+MAP <tag:clarkevans.com,2002:circle>\n=VAL :center\n+MAP &ORIGIN\n=VAL :x\n=VAL :73\n=VAL :y\n=VAL :129\n-MAP\n=VAL :radius\n=VAL :7\n-MAP\n+MAP <tag:clarkevans.com,2002:line>\n=VAL :start\n=ALI *ORIGIN\n=VAL :finish\n+MAP\n=VAL :x\n=VAL :89\n=VAL :y\n=VAL :102\n-MAP\n-MAP\n+MAP <tag:clarkevans.com,2002:label>\n=VAL :start\n=ALI *ORIGIN\n=VAL :color\n=VAL :0xFFEEBB\n=VAL :text\n=VAL :Pretty vector drawing.\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "2XXW",
"name": "spec-example-2-25-unordered-sets",
"label": "Spec Example 2.25. Unordered Sets",
"error": false,
"tags": [
"spec",
"mapping"
],
"files": {
"in_yaml": "# Sets are represented as a\n# Mapping where each key is\n# associated with a null value\n--- !!set\n? Mark McGwire\n? Sammy Sosa\n? Ken Griff\n",
"in_json": null,
"out_yaml": "--- !!set\nMark McGwire:\nSammy Sosa:\nKen Griff:\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP <tag:yaml.org,2002:set>\n=VAL :Mark McGwire\n=VAL :\n=VAL :Sammy Sosa\n=VAL :\n=VAL :Ken Griff\n=VAL :\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "J7PZ",
"name": "spec-example-2-26-ordered-mappings",
"label": "Spec Example 2.26. Ordered Mappings",
"error": false,
"tags": [
"spec",
"mapping"
],
"files": {
"in_yaml": "# Ordered maps are represented as\n# A sequence of mappings, with\n# each mapping having one key\n--- !!omap\n- Mark McGwire: 65\n- Sammy Sosa: 63\n- Ken Griffy: 58\n",
"in_json": "[\n {\n \"Mark McGwire\": 65\n },\n {\n \"Sammy Sosa\": 63\n },\n {\n \"Ken Griffy\": 58\n }\n]\n",
"out_yaml": "--- !!omap\n- Mark McGwire: 65\n- Sammy Sosa: 63\n- Ken Griffy: 58\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ <tag:yaml.org,2002:omap>\n+MAP\n=VAL :Mark McGwire\n=VAL :65\n-MAP\n+MAP\n=VAL :Sammy Sosa\n=VAL :63\n-MAP\n+MAP\n=VAL :Ken Griffy\n=VAL :58\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "UGM3",
"name": "spec-example-2-27-invoice",
"label": "Spec Example 2.27. Invoice",
"error": false,
"tags": [
"sequence",
"spec",
"alias",
"literal",
"tag",
"mapping"
],
"files": {
"in_yaml": "--- !<tag:clarkevans.com,2002:invoice>\ninvoice: 34843\ndate : 2001-01-23\nbill-to: &id001\n given : Chris\n family : Dumars\n address:\n lines: |\n 458 Walkman Dr.\n Suite #292\n city : Royal Oak\n state : MI\n postal : 48046\nship-to: *id001\nproduct:\n - sku : BL394D\n quantity : 4\n description : Basketball\n price : 450.00\n - sku : BL4438H\n quantity : 1\n description : Super Hoop\n price : 2392.00\ntax : 251.42\ntotal: 4443.52\ncomments:\n Late afternoon is best.\n Backup contact is Nancy\n Billsmer @ 338-4338.\n",
"in_json": "{\n \"invoice\": 34843,\n \"date\": \"2001-01-23\",\n \"bill-to\": {\n \"given\": \"Chris\",\n \"family\": \"Dumars\",\n \"address\": {\n \"lines\": \"458 Walkman Dr.\\nSuite #292\\n\",\n \"city\": \"Royal Oak\",\n \"state\": \"MI\",\n \"postal\": 48046\n }\n },\n \"ship-to\": {\n \"given\": \"Chris\",\n \"family\": \"Dumars\",\n \"address\": {\n \"lines\": \"458 Walkman Dr.\\nSuite #292\\n\",\n \"city\": \"Royal Oak\",\n \"state\": \"MI\",\n \"postal\": 48046\n }\n },\n \"product\": [\n {\n \"sku\": \"BL394D\",\n \"quantity\": 4,\n \"description\": \"Basketball\",\n \"price\": 450\n },\n {\n \"sku\": \"BL4438H\",\n \"quantity\": 1,\n \"description\": \"Super Hoop\",\n \"price\": 2392\n }\n ],\n \"tax\": 251.42,\n \"total\": 4443.52,\n \"comments\": \"Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.\"\n}\n",
"out_yaml": "--- !<tag:clarkevans.com,2002:invoice>\ninvoice: 34843\ndate: 2001-01-23\nbill-to: &id001\n given: Chris\n family: Dumars\n address:\n lines: |\n 458 Walkman Dr.\n Suite #292\n city: Royal Oak\n state: MI\n postal: 48046\nship-to: *id001\nproduct:\n- sku: BL394D\n quantity: 4\n description: Basketball\n price: 450.00\n- sku: BL4438H\n quantity: 1\n description: Super Hoop\n price: 2392.00\ntax: 251.42\ntotal: 4443.52\ncomments: Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP <tag:clarkevans.com,2002:invoice>\n=VAL :invoice\n=VAL :34843\n=VAL :date\n=VAL :2001-01-23\n=VAL :bill-to\n+MAP &id001\n=VAL :given\n=VAL :Chris\n=VAL :family\n=VAL :Dumars\n=VAL :address\n+MAP\n=VAL :lines\n=VAL |458 Walkman Dr.\\nSuite #292\\n\n=VAL :city\n=VAL :Royal Oak\n=VAL :state\n=VAL :MI\n=VAL :postal\n=VAL :48046\n-MAP\n-MAP\n=VAL :ship-to\n=ALI *id001\n=VAL :product\n+SEQ\n+MAP\n=VAL :sku\n=VAL :BL394D\n=VAL :quantity\n=VAL :4\n=VAL :description\n=VAL :Basketball\n=VAL :price\n=VAL :450.00\n-MAP\n+MAP\n=VAL :sku\n=VAL :BL4438H\n=VAL :quantity\n=VAL :1\n=VAL :description\n=VAL :Super Hoop\n=VAL :price\n=VAL :2392.00\n-MAP\n-SEQ\n=VAL :tax\n=VAL :251.42\n=VAL :total\n=VAL :4443.52\n=VAL :comments\n=VAL :Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "RZT7",
"name": "spec-example-2-28-log-file",
"label": "Spec Example 2.28. Log File",
"error": false,
"tags": [
"sequence",
"spec",
"header",
"literal",
"mapping"
],
"files": {
"in_yaml": "---\nTime: 2001-11-23 15:01:42 -5\nUser: ed\nWarning:\n This is an error message\n for the log file\n---\nTime: 2001-11-23 15:02:31 -5\nUser: ed\nWarning:\n A slightly different error\n message.\n---\nDate: 2001-11-23 15:03:17 -5\nUser: ed\nFatal:\n Unknown variable \"bar\"\nStack:\n - file: TopClass.py\n line: 23\n code: |\n x = MoreObject(\"345\\n\")\n - file: MoreClass.py\n line: 58\n code: |-\n foo = bar\n",
"in_json": "{\n \"Time\": \"2001-11-23 15:01:42 -5\",\n \"User\": \"ed\",\n \"Warning\": \"This is an error message for the log file\"\n}\n{\n \"Time\": \"2001-11-23 15:02:31 -5\",\n \"User\": \"ed\",\n \"Warning\": \"A slightly different error message.\"\n}\n{\n \"Date\": \"2001-11-23 15:03:17 -5\",\n \"User\": \"ed\",\n \"Fatal\": \"Unknown variable \\\"bar\\\"\",\n \"Stack\": [\n {\n \"file\": \"TopClass.py\",\n \"line\": 23,\n \"code\": \"x = MoreObject(\\\"345\\\\n\\\")\\n\"\n },\n {\n \"file\": \"MoreClass.py\",\n \"line\": 58,\n \"code\": \"foo = bar\"\n }\n ]\n}\n",
"out_yaml": "---\nTime: 2001-11-23 15:01:42 -5\nUser: ed\nWarning: This is an error message for the log file\n---\nTime: 2001-11-23 15:02:31 -5\nUser: ed\nWarning: A slightly different error message.\n---\nDate: 2001-11-23 15:03:17 -5\nUser: ed\nFatal: Unknown variable \"bar\"\nStack:\n- file: TopClass.py\n line: 23\n code: |\n x = MoreObject(\"345\\n\")\n- file: MoreClass.py\n line: 58\n code: |-\n foo = bar\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :Time\n=VAL :2001-11-23 15:01:42 -5\n=VAL :User\n=VAL :ed\n=VAL :Warning\n=VAL :This is an error message for the log file\n-MAP\n-DOC\n+DOC ---\n+MAP\n=VAL :Time\n=VAL :2001-11-23 15:02:31 -5\n=VAL :User\n=VAL :ed\n=VAL :Warning\n=VAL :A slightly different error message.\n-MAP\n-DOC\n+DOC ---\n+MAP\n=VAL :Date\n=VAL :2001-11-23 15:03:17 -5\n=VAL :User\n=VAL :ed\n=VAL :Fatal\n=VAL :Unknown variable \"bar\"\n=VAL :Stack\n+SEQ\n+MAP\n=VAL :file\n=VAL :TopClass.py\n=VAL :line\n=VAL :23\n=VAL :code\n=VAL |x = MoreObject(\"345\\\\n\")\\n\n-MAP\n+MAP\n=VAL :file\n=VAL :MoreClass.py\n=VAL :line\n=VAL :58\n=VAL :code\n=VAL |foo = bar\n-MAP\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "PBJ2",
"name": "spec-example-2-3-mapping-scalars-to-sequences",
"label": "Spec Example 2.3. Mapping Scalars to Sequences",
"error": false,
"tags": [
"sequence",
"spec",
"mapping"
],
"files": {
"in_yaml": "american:\n - Boston Red Sox\n - Detroit Tigers\n - New York Yankees\nnational:\n - New York Mets\n - Chicago Cubs\n - Atlanta Braves\n",
"in_json": "{\n \"american\": [\n \"Boston Red Sox\",\n \"Detroit Tigers\",\n \"New York Yankees\"\n ],\n \"national\": [\n \"New York Mets\",\n \"Chicago Cubs\",\n \"Atlanta Braves\"\n ]\n}\n",
"out_yaml": "american:\n- Boston Red Sox\n- Detroit Tigers\n- New York Yankees\nnational:\n- New York Mets\n- Chicago Cubs\n- Atlanta Braves\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :american\n+SEQ\n=VAL :Boston Red Sox\n=VAL :Detroit Tigers\n=VAL :New York Yankees\n-SEQ\n=VAL :national\n+SEQ\n=VAL :New York Mets\n=VAL :Chicago Cubs\n=VAL :Atlanta Braves\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "229Q",
"name": "spec-example-2-4-sequence-of-mappings",
"label": "Spec Example 2.4. Sequence of Mappings",
"error": false,
"tags": [
"sequence",
"spec",
"mapping"
],
"files": {
"in_yaml": "-\n name: Mark McGwire\n hr: 65\n avg: 0.278\n-\n name: Sammy Sosa\n hr: 63\n avg: 0.288\n",
"in_json": "[\n {\n \"name\": \"Mark McGwire\",\n \"hr\": 65,\n \"avg\": 0.278\n },\n {\n \"name\": \"Sammy Sosa\",\n \"hr\": 63,\n \"avg\": 0.288\n }\n]\n",
"out_yaml": "- name: Mark McGwire\n hr: 65\n avg: 0.278\n- name: Sammy Sosa\n hr: 63\n avg: 0.288\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :name\n=VAL :Mark McGwire\n=VAL :hr\n=VAL :65\n=VAL :avg\n=VAL :0.278\n-MAP\n+MAP\n=VAL :name\n=VAL :Sammy Sosa\n=VAL :hr\n=VAL :63\n=VAL :avg\n=VAL :0.288\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "YD5X",
"name": "spec-example-2-5-sequence-of-sequences",
"label": "Spec Example 2.5. Sequence of Sequences",
"error": false,
"tags": [
"sequence",
"spec"
],
"files": {
"in_yaml": "- [name , hr, avg ]\n- [Mark McGwire, 65, 0.278]\n- [Sammy Sosa , 63, 0.288]\n",
"in_json": "[\n [\n \"name\",\n \"hr\",\n \"avg\"\n ],\n [\n \"Mark McGwire\",\n 65,\n 0.278\n ],\n [\n \"Sammy Sosa\",\n 63,\n 0.288\n ]\n]\n",
"out_yaml": "- - name\n - hr\n - avg\n- - Mark McGwire\n - 65\n - 0.278\n- - Sammy Sosa\n - 63\n - 0.288\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+SEQ\n=VAL :name\n=VAL :hr\n=VAL :avg\n-SEQ\n+SEQ\n=VAL :Mark McGwire\n=VAL :65\n=VAL :0.278\n-SEQ\n+SEQ\n=VAL :Sammy Sosa\n=VAL :63\n=VAL :0.288\n-SEQ\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "ZF4X",
"name": "spec-example-2-6-mapping-of-mappings",
"label": "Spec Example 2.6. Mapping of Mappings",
"error": false,
"tags": [
"spec",
"mapping"
],
"files": {
"in_yaml": "Mark McGwire: {hr: 65, avg: 0.278}\nSammy Sosa: {\n hr: 63,\n avg: 0.288\n }\n",
"in_json": "{\n \"Mark McGwire\": {\n \"hr\": 65,\n \"avg\": 0.278\n },\n \"Sammy Sosa\": {\n \"hr\": 63,\n \"avg\": 0.288\n }\n}\n",
"out_yaml": "Mark McGwire:\n hr: 65\n avg: 0.278\nSammy Sosa:\n hr: 63\n avg: 0.288\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :Mark McGwire\n+MAP\n=VAL :hr\n=VAL :65\n=VAL :avg\n=VAL :0.278\n-MAP\n=VAL :Sammy Sosa\n+MAP\n=VAL :hr\n=VAL :63\n=VAL :avg\n=VAL :0.288\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "JHB9",
"name": "spec-example-2-7-two-documents-in-a-stream",
"label": "Spec Example 2.7. Two Documents in a Stream",
"error": false,
"tags": [
"spec",
"header"
],
"files": {
"in_yaml": "# Ranking of 1998 home runs\n---\n- Mark McGwire\n- Sammy Sosa\n- Ken Griffey\n\n# Team ranking\n---\n- Chicago Cubs\n- St Louis Cardinals\n",
"in_json": "[\n \"Mark McGwire\",\n \"Sammy Sosa\",\n \"Ken Griffey\"\n]\n[\n \"Chicago Cubs\",\n \"St Louis Cardinals\"\n]\n",
"out_yaml": "---\n- Mark McGwire\n- Sammy Sosa\n- Ken Griffey\n---\n- Chicago Cubs\n- St Louis Cardinals\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL :Mark McGwire\n=VAL :Sammy Sosa\n=VAL :Ken Griffey\n-SEQ\n-DOC\n+DOC ---\n+SEQ\n=VAL :Chicago Cubs\n=VAL :St Louis Cardinals\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "U9NS",
"name": "spec-example-2-8-play-by-play-feed-from-a-game",
"label": "Spec Example 2.8. Play by Play Feed from a Game",
"error": false,
"tags": [
"spec",
"header"
],
"files": {
"in_yaml": "---\ntime: 20:03:20\nplayer: Sammy Sosa\naction: strike (miss)\n...\n---\ntime: 20:03:47\nplayer: Sammy Sosa\naction: grand slam\n...\n",
"in_json": "{\n \"time\": \"20:03:20\",\n \"player\": \"Sammy Sosa\",\n \"action\": \"strike (miss)\"\n}\n{\n \"time\": \"20:03:47\",\n \"player\": \"Sammy Sosa\",\n \"action\": \"grand slam\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :time\n=VAL :20:03:20\n=VAL :player\n=VAL :Sammy Sosa\n=VAL :action\n=VAL :strike (miss)\n-MAP\n-DOC ...\n+DOC ---\n+MAP\n=VAL :time\n=VAL :20:03:47\n=VAL :player\n=VAL :Sammy Sosa\n=VAL :action\n=VAL :grand slam\n-MAP\n-DOC ...\n-STR\n"
}
},
{
"id": "J9HZ",
"name": "spec-example-2-9-single-document-with-two-comments",
"label": "Spec Example 2.9. Single Document with Two Comments",
"error": false,
"tags": [
"comment",
"spec"
],
"files": {
"in_yaml": "---\nhr: # 1998 hr ranking\n - Mark McGwire\n - Sammy Sosa\nrbi:\n # 1998 rbi ranking\n - Sammy Sosa\n - Ken Griffey\n",
"in_json": "{\n \"hr\": [\n \"Mark McGwire\",\n \"Sammy Sosa\"\n ],\n \"rbi\": [\n \"Sammy Sosa\",\n \"Ken Griffey\"\n ]\n}\n",
"out_yaml": "---\nhr:\n- Mark McGwire\n- Sammy Sosa\nrbi:\n- Sammy Sosa\n- Ken Griffey\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :hr\n+SEQ\n=VAL :Mark McGwire\n=VAL :Sammy Sosa\n-SEQ\n=VAL :rbi\n+SEQ\n=VAL :Sammy Sosa\n=VAL :Ken Griffey\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "J3BT",
"name": "spec-example-5-12-tabs-and-spaces",
"label": "Spec Example 5.12. Tabs and Spaces",
"error": false,
"tags": [
"upto-1.2",
"spec",
"whitespace"
],
"files": {
"in_yaml": "# Tabs and spaces\nquoted: \"Quoted \t\"\nblock:\t|\n void main() {\n \tprintf(\"Hello, world!\\n\");\n }\n",
"in_json": "{\n \"quoted\": \"Quoted \\t\",\n \"block\": \"void main() {\\n\\tprintf(\\\"Hello, world!\\\\n\\\");\\n}\\n\"\n}\n",
"out_yaml": "quoted: \"Quoted \\t\"\nblock: |\n void main() {\n \tprintf(\"Hello, world!\\n\");\n }\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :quoted\n=VAL \"Quoted \\t\n=VAL :block\n=VAL |void main() {\\n\\tprintf(\"Hello, world!\\\\n\");\\n}\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "S9E8",
"name": "spec-example-5-3-block-structure-indicators",
"label": "Spec Example 5.3. Block Structure Indicators",
"error": false,
"tags": [
"sequence",
"spec",
"mapping"
],
"files": {
"in_yaml": "sequence:\n- one\n- two\nmapping:\n ? sky\n : blue\n sea : green\n",
"in_json": "{\n \"sequence\": [\n \"one\",\n \"two\"\n ],\n \"mapping\": {\n \"sky\": \"blue\",\n \"sea\": \"green\"\n }\n}\n",
"out_yaml": "sequence:\n- one\n- two\nmapping:\n sky: blue\n sea: green\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :sequence\n+SEQ\n=VAL :one\n=VAL :two\n-SEQ\n=VAL :mapping\n+MAP\n=VAL :sky\n=VAL :blue\n=VAL :sea\n=VAL :green\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "UDR7",
"name": "spec-example-5-4-flow-collection-indicators",
"label": "Spec Example 5.4. Flow Collection Indicators",
"error": false,
"tags": [
"sequence",
"flow",
"spec",
"mapping"
],
"files": {
"in_yaml": "sequence: [ one, two, ]\nmapping: { sky: blue, sea: green }\n",
"in_json": "{\n \"sequence\": [\n \"one\",\n \"two\"\n ],\n \"mapping\": {\n \"sky\": \"blue\",\n \"sea\": \"green\"\n }\n}\n",
"out_yaml": "sequence:\n- one\n- two\nmapping:\n sky: blue\n sea: green\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :sequence\n+SEQ\n=VAL :one\n=VAL :two\n-SEQ\n=VAL :mapping\n+MAP\n=VAL :sky\n=VAL :blue\n=VAL :sea\n=VAL :green\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "98YD",
"name": "spec-example-5-5-comment-indicator",
"label": "Spec Example 5.5. Comment Indicator",
"error": false,
"tags": [
"comment",
"spec",
"empty"
],
"files": {
"in_yaml": "# Comment only.\n",
"in_json": "",
"out_yaml": "",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n-STR\n"
}
},
{
"id": "CUP7",
"name": "spec-example-5-6-node-property-indicators",
"label": "Spec Example 5.6. Node Property Indicators",
"error": false,
"tags": [
"spec",
"alias",
"tag"
],
"files": {
"in_yaml": "anchored: !local &anchor value\nalias: *anchor\n",
"in_json": "{\n \"anchored\": \"value\",\n \"alias\": \"value\"\n}\n",
"out_yaml": "anchored: &anchor !local value\nalias: *anchor\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :anchored\n=VAL &anchor <!local> :value\n=VAL :alias\n=ALI *anchor\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "5BVJ",
"name": "spec-example-5-7-block-scalar-indicators",
"label": "Spec Example 5.7. Block Scalar Indicators",
"error": false,
"tags": [
"spec",
"literal",
"scalar",
"folded"
],
"files": {
"in_yaml": "literal: |\n some\n text\nfolded: >\n some\n text\n",
"in_json": "{\n \"literal\": \"some\\ntext\\n\",\n \"folded\": \"some text\\n\"\n}\n",
"out_yaml": "literal: |\n some\n text\nfolded: >\n some text\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :literal\n=VAL |some\\ntext\\n\n=VAL :folded\n=VAL >some text\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "9SHH",
"name": "spec-example-5-8-quoted-scalar-indicators",
"label": "Spec Example 5.8. Quoted Scalar Indicators",
"error": false,
"tags": [
"spec",
"scalar"
],
"files": {
"in_yaml": "single: 'text'\ndouble: \"text\"\n",
"in_json": "{\n \"single\": \"text\",\n \"double\": \"text\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :single\n=VAL 'text\n=VAL :double\n=VAL \"text\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "27NA",
"name": "spec-example-5-9-directive-indicator",
"label": "Spec Example 5.9. Directive Indicator",
"error": false,
"tags": [
"directive",
"1.3-err",
"spec"
],
"files": {
"in_yaml": "%YAML 1.2\n--- text\n",
"in_json": "\"text\"\n",
"out_yaml": "--- text\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :text\n-DOC\n-STR\n"
}
},
{
"id": "6HB6",
"name": "spec-example-6-1-indentation-spaces",
"label": "Spec Example 6.1. Indentation Spaces",
"error": false,
"tags": [
"upto-1.2",
"indent",
"spec"
],
"files": {
"in_yaml": " # Leading comment line spaces are\n # neither content nor indentation.\n \nNot indented:\n By one space: |\n By four\n spaces\n Flow style: [ # Leading spaces\n By two, # in flow style\n Also by two, # are neither\n \tStill by two # content nor\n ] # indentation.\n",
"in_json": "{\n \"Not indented\": {\n \"By one space\": \"By four\\n spaces\\n\",\n \"Flow style\": [\n \"By two\",\n \"Also by two\",\n \"Still by two\"\n ]\n }\n}\n",
"out_yaml": "Not indented:\n By one space: |\n By four\n spaces\n Flow style:\n - By two\n - Also by two\n - Still by two\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :Not indented\n+MAP\n=VAL :By one space\n=VAL |By four\\n spaces\\n\n=VAL :Flow style\n+SEQ\n=VAL :By two\n=VAL :Also by two\n=VAL :Still by two\n-SEQ\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "8G76",
"name": "spec-example-6-10-comment-lines",
"label": "Spec Example 6.10. Comment Lines",
"error": false,
"tags": [
"comment",
"spec",
"empty",
"scalar"
],
"files": {
"in_yaml": " # Comment\n \n\n\n",
"in_json": "",
"out_yaml": "",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n-STR\n"
}
},
{
"id": "P94K",
"name": "spec-example-6-11-multi-line-comments",
"label": "Spec Example 6.11. Multi-Line Comments",
"error": false,
"tags": [
"comment",
"spec"
],
"files": {
"in_yaml": "key: # Comment\n # lines\n value\n\n\n",
"in_json": "{\n \"key\": \"value\"\n}\n",
"out_yaml": "key: value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n=VAL :value\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "Q9WF",
"name": "spec-example-6-12-separation-spaces",
"label": "Spec Example 6.12. Separation Spaces",
"error": false,
"tags": [
"1.3-err",
"comment",
"spec",
"whitespace"
],
"files": {
"in_yaml": "{ first: Sammy, last: Sosa }:\n# Statistics:\n hr: # Home runs\n 65\n avg: # Average\n 0.278\n",
"in_json": null,
"out_yaml": "? first: Sammy\n last: Sosa\n: hr: 65\n avg: 0.278\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n+MAP\n=VAL :first\n=VAL :Sammy\n=VAL :last\n=VAL :Sosa\n-MAP\n+MAP\n=VAL :hr\n=VAL :65\n=VAL :avg\n=VAL :0.278\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "6LVF",
"name": "spec-example-6-13-reserved-directives",
"label": "Spec Example 6.13. Reserved Directives",
"error": false,
"tags": [
"directive",
"1.3-err",
"spec",
"header",
"double"
],
"files": {
"in_yaml": "%FOO bar baz # Should be ignored\n # with a warning.\n--- \"foo\"\n",
"in_json": "\"foo\"\n",
"out_yaml": "--- \"foo\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL \"foo\n-DOC\n-STR\n"
}
},
{
"id": "2LFX",
"name": "spec-example-6-13-reserved-directives-1-3",
"label": "Spec Example 6.13. Reserved Directives [1.3]",
"error": false,
"tags": [
"directive",
"spec",
"header",
"double",
"1.3-mod"
],
"files": {
"in_yaml": "%FOO bar baz # Should be ignored\n # with a warning.\n---\n\"foo\"\n",
"in_json": "\"foo\"\n",
"out_yaml": "---\n\"foo\"\n",
"emit_yaml": "--- \"foo\"\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL \"foo\n-DOC\n-STR\n"
}
},
{
"id": "BEC7",
"name": "spec-example-6-14-yaml-directive",
"label": "Spec Example 6.14. \u201cYAML\u201d directive",
"error": false,
"tags": [
"directive",
"spec"
],
"files": {
"in_yaml": "%YAML 1.3 # Attempt parsing\n # with a warning\n---\n\"foo\"\n",
"in_json": "\"foo\"\n",
"out_yaml": "--- \"foo\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL \"foo\n-DOC\n-STR\n"
}
},
{
"id": "U3C3",
"name": "spec-example-6-16-tag-directive",
"label": "Spec Example 6.16. \u201cTAG\u201d directive",
"error": false,
"tags": [
"spec",
"header",
"tag"
],
"files": {
"in_yaml": "%TAG !yaml! tag:yaml.org,2002:\n---\n!yaml!str \"foo\"\n",
"in_json": "\"foo\"\n",
"out_yaml": "--- !!str \"foo\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL <tag:yaml.org,2002:str> \"foo\n-DOC\n-STR\n"
}
},
{
"id": "9WXW",
"name": "spec-example-6-18-primary-tag-handle",
"label": "Spec Example 6.18. Primary Tag Handle",
"error": false,
"tags": [
"directive",
"1.3-err",
"spec",
"tag"
],
"files": {
"in_yaml": "# Private\n!foo \"bar\"\n...\n# Global\n%TAG ! tag:example.com,2000:app/\n---\n!foo \"bar\"\n",
"in_json": null,
"out_yaml": "!foo \"bar\"\n...\n--- !<tag:example.com,2000:app/foo> \"bar\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL <!foo> \"bar\n-DOC ...\n+DOC ---\n=VAL <tag:example.com,2000:app/foo> \"bar\n-DOC\n-STR\n"
}
},
{
"id": "6WLZ",
"name": "spec-example-6-18-primary-tag-handle-1-3",
"label": "Spec Example 6.18. Primary Tag Handle [1.3]",
"error": false,
"tags": [
"directive",
"spec",
"tag",
"1.3-mod"
],
"files": {
"in_yaml": "# Private\n---\n!foo \"bar\"\n...\n# Global\n%TAG ! tag:example.com,2000:app/\n---\n!foo \"bar\"\n",
"in_json": null,
"out_yaml": "---\n!foo \"bar\"\n...\n--- !<tag:example.com,2000:app/foo>\n\"bar\"\n",
"emit_yaml": "--- !foo \"bar\"\n...\n--- !<tag:example.com,2000:app/foo> \"bar\"\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL <!foo> \"bar\n-DOC ...\n+DOC ---\n=VAL <tag:example.com,2000:app/foo> \"bar\n-DOC\n-STR\n"
}
},
{
"id": "P76L",
"name": "spec-example-6-19-secondary-tag-handle",
"label": "Spec Example 6.19. Secondary Tag Handle",
"error": false,
"tags": [
"spec",
"header",
"tag"
],
"files": {
"in_yaml": "%TAG !! tag:example.com,2000:app/\n---\n!!int 1 - 3 # Interval, not integer\n",
"in_json": null,
"out_yaml": "--- !<tag:example.com,2000:app/int> 1 - 3\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL <tag:example.com,2000:app/int> :1 - 3\n-DOC\n-STR\n"
}
},
{
"id": "A2M4",
"name": "spec-example-6-2-indentation-indicators",
"label": "Spec Example 6.2. Indentation Indicators",
"error": false,
"tags": [
"sequence",
"upto-1.2",
"libyaml-err",
"indent",
"spec",
"whitespace"
],
"files": {
"in_yaml": "? a\n: -\tb\n - -\tc\n - d\n",
"in_json": "{\n \"a\": [\n \"b\",\n [\n \"c\",\n \"d\"\n ]\n ]\n}\n",
"out_yaml": "a:\n- b\n- - c\n - d\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n+SEQ\n=VAL :b\n+SEQ\n=VAL :c\n=VAL :d\n-SEQ\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "CC74",
"name": "spec-example-6-20-tag-handles",
"label": "Spec Example 6.20. Tag Handles",
"error": false,
"tags": [
"directive",
"spec",
"tag"
],
"files": {
"in_yaml": "%TAG !e! tag:example.com,2000:app/\n---\n!e!foo \"bar\"\n",
"in_json": null,
"out_yaml": "--- !<tag:example.com,2000:app/foo> \"bar\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL <tag:example.com,2000:app/foo> \"bar\n-DOC\n-STR\n"
}
},
{
"id": "5TYM",
"name": "spec-example-6-21-local-tag-prefix",
"label": "Spec Example 6.21. Local Tag Prefix",
"error": false,
"tags": [
"directive",
"spec",
"tag"
],
"files": {
"in_yaml": "%TAG !m! !my-\n--- # Bulb here\n!m!light fluorescent\n...\n%TAG !m! !my-\n--- # Color here\n!m!light green\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL <!my-light> :fluorescent\n-DOC ...\n+DOC ---\n=VAL <!my-light> :green\n-DOC\n-STR\n"
}
},
{
"id": "Z9M4",
"name": "spec-example-6-22-global-tag-prefix",
"label": "Spec Example 6.22. Global Tag Prefix",
"error": false,
"tags": [
"spec",
"header",
"tag"
],
"files": {
"in_yaml": "%TAG !e! tag:example.com,2000:app/\n---\n- !e!foo \"bar\"\n",
"in_json": null,
"out_yaml": "---\n- !<tag:example.com,2000:app/foo> \"bar\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL <tag:example.com,2000:app/foo> \"bar\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "HMQ5",
"name": "spec-example-6-23-node-properties",
"label": "Spec Example 6.23. Node Properties",
"error": false,
"tags": [
"spec",
"alias",
"tag"
],
"files": {
"in_yaml": "!!str &a1 \"foo\":\n !!str bar\n&a2 baz : *a1\n",
"in_json": "{\n \"foo\": \"bar\",\n \"baz\": \"foo\"\n}\n",
"out_yaml": "&a1 !!str \"foo\": !!str bar\n&a2 baz: *a1\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL &a1 <tag:yaml.org,2002:str> \"foo\n=VAL <tag:yaml.org,2002:str> :bar\n=VAL &a2 :baz\n=ALI *a1\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "7FWL",
"name": "spec-example-6-24-verbatim-tags",
"label": "Spec Example 6.24. Verbatim Tags",
"error": false,
"tags": [
"spec",
"tag"
],
"files": {
"in_yaml": "!<tag:yaml.org,2002:str> foo :\n !<!bar> baz\n",
"in_json": null,
"out_yaml": "!!str foo: !bar baz\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL <tag:yaml.org,2002:str> :foo\n=VAL <!bar> :baz\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "6CK3",
"name": "spec-example-6-26-tag-shorthands",
"label": "Spec Example 6.26. Tag Shorthands",
"error": false,
"tags": [
"spec",
"tag"
],
"files": {
"in_yaml": "%TAG !e! tag:example.com,2000:app/\n---\n- !local foo\n- !!str bar\n- !e!tag%21 baz\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+SEQ\n=VAL <!local> :foo\n=VAL <tag:yaml.org,2002:str> :bar\n=VAL <tag:example.com,2000:app/tag!> :baz\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "S4JQ",
"name": "spec-example-6-28-non-specific-tags",
"label": "Spec Example 6.28. Non-Specific Tags",
"error": false,
"tags": [
"spec",
"tag"
],
"files": {
"in_yaml": "# Assuming conventional resolution:\n- \"12\"\n- 12\n- ! 12\n",
"in_json": "[\n \"12\",\n 12,\n \"12\"\n]\n",
"out_yaml": "- \"12\"\n- 12\n- ! 12\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL \"12\n=VAL :12\n=VAL <!> :12\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "JS2J",
"name": "spec-example-6-29-node-anchors",
"label": "Spec Example 6.29. Node Anchors",
"error": false,
"tags": [
"spec",
"alias"
],
"files": {
"in_yaml": "First occurrence: &anchor Value\nSecond occurrence: *anchor\n",
"in_json": "{\n \"First occurrence\": \"Value\",\n \"Second occurrence\": \"Value\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :First occurrence\n=VAL &anchor :Value\n=VAL :Second occurrence\n=ALI *anchor\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "6BCT",
"name": "spec-example-6-3-separation-spaces",
"label": "Spec Example 6.3. Separation Spaces",
"error": false,
"tags": [
"sequence",
"upto-1.2",
"libyaml-err",
"spec",
"whitespace"
],
"files": {
"in_yaml": "- foo:\t bar\n- - baz\n -\tbaz\n",
"in_json": "[\n {\n \"foo\": \"bar\"\n },\n [\n \"baz\",\n \"baz\"\n ]\n]\n",
"out_yaml": "- foo: bar\n- - baz\n - baz\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :foo\n=VAL :bar\n-MAP\n+SEQ\n=VAL :baz\n=VAL :baz\n-SEQ\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "4ZYM",
"name": "spec-example-6-4-line-prefixes",
"label": "Spec Example 6.4. Line Prefixes",
"error": false,
"tags": [
"upto-1.2",
"spec",
"literal",
"scalar",
"double"
],
"files": {
"in_yaml": "plain: text\n lines\nquoted: \"text\n \tlines\"\nblock: |\n text\n \tlines\n",
"in_json": "{\n \"plain\": \"text lines\",\n \"quoted\": \"text lines\",\n \"block\": \"text\\n \\tlines\\n\"\n}\n",
"out_yaml": "plain: text lines\nquoted: \"text lines\"\nblock: \"text\\n \\tlines\\n\"\n",
"emit_yaml": "plain: text lines\nquoted: \"text lines\"\nblock: |\n text\n \tlines\n",
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :plain\n=VAL :text lines\n=VAL :quoted\n=VAL \"text lines\n=VAL :block\n=VAL |text\\n \\tlines\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "5GBF",
"name": "spec-example-6-5-empty-lines",
"label": "Spec Example 6.5. Empty Lines",
"error": false,
"tags": [
"upto-1.2",
"spec",
"scalar"
],
"files": {
"in_yaml": "Folding:\n \"Empty line\n \t\n as a line feed\"\nChomping: |\n Clipped empty lines\n \n\n",
"in_json": "{\n \"Folding\": \"Empty line\\nas a line feed\",\n \"Chomping\": \"Clipped empty lines\\n\"\n}\n",
"out_yaml": "Folding: \"Empty line\\nas a line feed\"\nChomping: |\n Clipped empty lines\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :Folding\n=VAL \"Empty line\\nas a line feed\n=VAL :Chomping\n=VAL |Clipped empty lines\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "XV9V",
"name": "spec-example-6-5-empty-lines-1-3",
"label": "Spec Example 6.5. Empty Lines [1.3]",
"error": false,
"tags": [
"spec",
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "Folding:\n \"Empty line\n\n as a line feed\"\nChomping: |\n Clipped empty lines\n \n\n",
"in_json": "{\n \"Folding\": \"Empty line\\nas a line feed\",\n \"Chomping\": \"Clipped empty lines\\n\"\n}\n",
"out_yaml": "Folding: \"Empty line\\nas a line feed\"\nChomping: |\n Clipped empty lines\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :Folding\n=VAL \"Empty line\\nas a line feed\n=VAL :Chomping\n=VAL |Clipped empty lines\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "K527",
"name": "spec-example-6-6-line-folding",
"label": "Spec Example 6.6. Line Folding",
"error": false,
"tags": [
"1.3-err",
"spec",
"whitespace",
"scalar"
],
"files": {
"in_yaml": ">-\n trimmed\n \n \n\n as\n space\n",
"in_json": "\"trimmed\\n\\n\\nas space\"\n",
"out_yaml": ">-\n trimmed\n\n\n\n as space\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL >trimmed\\n\\n\\nas space\n-DOC\n-STR\n"
}
},
{
"id": "93WF",
"name": "spec-example-6-6-line-folding-1-3",
"label": "Spec Example 6.6. Line Folding [1.3]",
"error": false,
"tags": [
"spec",
"whitespace",
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "--- >-\n trimmed\n \n \n\n as\n space\n",
"in_json": "\"trimmed\\n\\n\\nas space\"\n",
"out_yaml": "--- >-\n trimmed\n\n\n\n as space\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL >trimmed\\n\\n\\nas space\n-DOC\n-STR\n"
}
},
{
"id": "MJS9",
"name": "spec-example-6-7-block-folding",
"label": "Spec Example 6.7. Block Folding",
"error": false,
"tags": [
"1.3-err",
"spec",
"whitespace",
"scalar"
],
"files": {
"in_yaml": ">\n foo \n \n \t bar\n\n baz\n",
"in_json": "\"foo \\n\\n\\t bar\\n\\nbaz\\n\"\n",
"out_yaml": "\"foo \\n\\n\\t bar\\n\\nbaz\\n\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL >foo \\n\\n\\t bar\\n\\nbaz\\n\n-DOC\n-STR\n"
}
},
{
"id": "TL85",
"name": "spec-example-6-8-flow-folding",
"label": "Spec Example 6.8. Flow Folding",
"error": false,
"tags": [
"upto-1.2",
"spec",
"whitespace",
"scalar"
],
"files": {
"in_yaml": "\"\n foo \n \n \t bar\n\n baz\n\"\n",
"in_json": "\" foo\\nbar\\nbaz \"\n",
"out_yaml": "\" foo\\nbar\\nbaz \"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL \" foo\\nbar\\nbaz \n-DOC\n-STR\n"
}
},
{
"id": "6WPF",
"name": "spec-example-6-8-flow-folding-1-3",
"label": "Spec Example 6.8. Flow Folding [1.3]",
"error": false,
"tags": [
"spec",
"whitespace",
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "---\n\"\n foo \n \n bar\n\n baz\n\"\n",
"in_json": "\" foo\\nbar\\nbaz \"\n",
"out_yaml": "\" foo\\nbar\\nbaz \"\n",
"emit_yaml": "--- \" foo\\nbar\\nbaz \"\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL \" foo\\nbar\\nbaz \n-DOC\n-STR\n"
}
},
{
"id": "5NYZ",
"name": "spec-example-6-9-separated-comment",
"label": "Spec Example 6.9. Separated Comment",
"error": false,
"tags": [
"comment",
"spec"
],
"files": {
"in_yaml": "key: # Comment\n value\n",
"in_json": "{\n \"key\": \"value\"\n}\n",
"out_yaml": "key: value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n=VAL :value\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "3GZX",
"name": "spec-example-7-1-alias-nodes",
"label": "Spec Example 7.1. Alias Nodes",
"error": false,
"tags": [
"spec",
"alias"
],
"files": {
"in_yaml": "First occurrence: &anchor Foo\nSecond occurrence: *anchor\nOverride anchor: &anchor Bar\nReuse anchor: *anchor\n",
"in_json": "{\n \"First occurrence\": \"Foo\",\n \"Second occurrence\": \"Foo\",\n \"Override anchor\": \"Bar\",\n \"Reuse anchor\": \"Bar\"\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :First occurrence\n=VAL &anchor :Foo\n=VAL :Second occurrence\n=ALI *anchor\n=VAL :Override anchor\n=VAL &anchor :Bar\n=VAL :Reuse anchor\n=ALI *anchor\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "DBG4",
"name": "spec-example-7-10-plain-characters",
"label": "Spec Example 7.10. Plain Characters",
"error": false,
"tags": [
"sequence",
"flow",
"spec",
"scalar"
],
"files": {
"in_yaml": "# Outside flow collection:\n- ::vector\n- \": - ()\"\n- Up, up, and away!\n- -123\n- http://example.com/foo#bar\n# Inside flow collection:\n- [ ::vector,\n \": - ()\",\n \"Up, up and away!\",\n -123,\n http://example.com/foo#bar ]\n",
"in_json": "[\n \"::vector\",\n \": - ()\",\n \"Up, up, and away!\",\n -123,\n \"http://example.com/foo#bar\",\n [\n \"::vector\",\n \": - ()\",\n \"Up, up and away!\",\n -123,\n \"http://example.com/foo#bar\"\n ]\n]\n",
"out_yaml": "- ::vector\n- \": - ()\"\n- Up, up, and away!\n- -123\n- http://example.com/foo#bar\n- - ::vector\n - \": - ()\"\n - \"Up, up and away!\"\n - -123\n - http://example.com/foo#bar\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :::vector\n=VAL \": - ()\n=VAL :Up, up, and away!\n=VAL :-123\n=VAL :http://example.com/foo#bar\n+SEQ\n=VAL :::vector\n=VAL \": - ()\n=VAL \"Up, up and away!\n=VAL :-123\n=VAL :http://example.com/foo#bar\n-SEQ\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "L9U5",
"name": "spec-example-7-11-plain-implicit-keys",
"label": "Spec Example 7.11. Plain Implicit Keys",
"error": false,
"tags": [
"flow",
"spec",
"mapping"
],
"files": {
"in_yaml": "implicit block key : [\n implicit flow key : value,\n ]\n",
"in_json": "{\n \"implicit block key\": [\n {\n \"implicit flow key\": \"value\"\n }\n ]\n}\n",
"out_yaml": "implicit block key:\n- implicit flow key: value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :implicit block key\n+SEQ\n+MAP\n=VAL :implicit flow key\n=VAL :value\n-MAP\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "HS5T",
"name": "spec-example-7-12-plain-lines",
"label": "Spec Example 7.12. Plain Lines",
"error": false,
"tags": [
"upto-1.2",
"spec",
"scalar"
],
"files": {
"in_yaml": "1st non-empty\n\n 2nd non-empty \n\t3rd non-empty\n",
"in_json": "\"1st non-empty\\n2nd non-empty 3rd non-empty\"\n",
"out_yaml": "'1st non-empty\n\n 2nd non-empty 3rd non-empty'\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL :1st non-empty\\n2nd non-empty 3rd non-empty\n-DOC\n-STR\n"
}
},
{
"id": "5KJE",
"name": "spec-example-7-13-flow-sequence",
"label": "Spec Example 7.13. Flow Sequence",
"error": false,
"tags": [
"sequence",
"flow",
"spec"
],
"files": {
"in_yaml": "- [ one, two, ]\n- [three ,four]\n",
"in_json": "[\n [\n \"one\",\n \"two\"\n ],\n [\n \"three\",\n \"four\"\n ]\n]\n",
"out_yaml": "- - one\n - two\n- - three\n - four\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+SEQ\n=VAL :one\n=VAL :two\n-SEQ\n+SEQ\n=VAL :three\n=VAL :four\n-SEQ\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "8UDB",
"name": "spec-example-7-14-flow-sequence-entries",
"label": "Spec Example 7.14. Flow Sequence Entries",
"error": false,
"tags": [
"sequence",
"flow",
"spec"
],
"files": {
"in_yaml": "[\n\"double\n quoted\", 'single\n quoted',\nplain\n text, [ nested ],\nsingle: pair,\n]\n",
"in_json": "[\n \"double quoted\",\n \"single quoted\",\n \"plain text\",\n [\n \"nested\"\n ],\n {\n \"single\": \"pair\"\n }\n]\n",
"out_yaml": "- \"double quoted\"\n- 'single quoted'\n- plain text\n- - nested\n- single: pair\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL \"double quoted\n=VAL 'single quoted\n=VAL :plain text\n+SEQ\n=VAL :nested\n-SEQ\n+MAP\n=VAL :single\n=VAL :pair\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "5C5M",
"name": "spec-example-7-15-flow-mappings",
"label": "Spec Example 7.15. Flow Mappings",
"error": false,
"tags": [
"flow",
"spec",
"mapping"
],
"files": {
"in_yaml": "- { one : two , three: four , }\n- {five: six,seven : eight}\n",
"in_json": "[\n {\n \"one\": \"two\",\n \"three\": \"four\"\n },\n {\n \"five\": \"six\",\n \"seven\": \"eight\"\n }\n]\n",
"out_yaml": "- one: two\n three: four\n- five: six\n seven: eight\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :one\n=VAL :two\n=VAL :three\n=VAL :four\n-MAP\n+MAP\n=VAL :five\n=VAL :six\n=VAL :seven\n=VAL :eight\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "DFF7",
"name": "spec-example-7-16-flow-mapping-entries",
"label": "Spec Example 7.16. Flow Mapping Entries",
"error": false,
"tags": [
"flow",
"spec",
"mapping"
],
"files": {
"in_yaml": "{\n? explicit: entry,\nimplicit: entry,\n?\n}\n",
"in_json": null,
"out_yaml": "explicit: entry\nimplicit: entry\n:\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :explicit\n=VAL :entry\n=VAL :implicit\n=VAL :entry\n=VAL :\n=VAL :\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "4ABK",
"name": "spec-example-7-17-flow-mapping-separate-values",
"label": "Spec Example 7.17. Flow Mapping Separate Values",
"error": false,
"tags": [
"flow",
"spec",
"mapping"
],
"files": {
"in_yaml": "{\nunquoted : \"separate\",\nhttp://foo.com,\nomitted value:,\n: omitted key,\n}\n",
"in_json": null,
"out_yaml": "unquoted: \"separate\"\nhttp://foo.com: null\nomitted value: null\nnull: omitted key\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :unquoted\n=VAL \"separate\n=VAL :http://foo.com\n=VAL :\n=VAL :omitted value\n=VAL :\n=VAL :\n=VAL :omitted key\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "C2DT",
"name": "spec-example-7-18-flow-mapping-adjacent-values",
"label": "Spec Example 7.18. Flow Mapping Adjacent Values",
"error": false,
"tags": [
"flow",
"spec",
"mapping"
],
"files": {
"in_yaml": "{\n\"adjacent\":value,\n\"readable\": value,\n\"empty\":\n}\n",
"in_json": "{\n \"adjacent\": \"value\",\n \"readable\": \"value\",\n \"empty\": null\n}\n",
"out_yaml": "\"adjacent\": value\n\"readable\": value\n\"empty\":\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL \"adjacent\n=VAL :value\n=VAL \"readable\n=VAL :value\n=VAL \"empty\n=VAL :\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "QF4Y",
"name": "spec-example-7-19-single-pair-flow-mappings",
"label": "Spec Example 7.19. Single Pair Flow Mappings",
"error": false,
"tags": [
"flow",
"spec",
"mapping"
],
"files": {
"in_yaml": "[\nfoo: bar\n]\n",
"in_json": "[\n {\n \"foo\": \"bar\"\n }\n]\n",
"out_yaml": "- foo: bar\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :foo\n=VAL :bar\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "WZ62",
"name": "spec-example-7-2-empty-content",
"label": "Spec Example 7.2. Empty Content",
"error": false,
"tags": [
"flow",
"spec",
"scalar"
],
"files": {
"in_yaml": "{\n foo : !!str,\n !!str : bar,\n}\n",
"in_json": "{\n \"foo\": \"\",\n \"\": \"bar\"\n}\n",
"out_yaml": "foo: !!str\n!!str : bar\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n=VAL <tag:yaml.org,2002:str> :\n=VAL <tag:yaml.org,2002:str> :\n=VAL :bar\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "CT4Q",
"name": "spec-example-7-20-single-pair-explicit-entry",
"label": "Spec Example 7.20. Single Pair Explicit Entry",
"error": false,
"tags": [
"flow",
"spec",
"mapping"
],
"files": {
"in_yaml": "[\n? foo\n bar : baz\n]\n",
"in_json": "[\n {\n \"foo bar\": \"baz\"\n }\n]\n",
"out_yaml": "- foo bar: baz\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :foo bar\n=VAL :baz\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "KZN9",
"name": "spec-example-7-21-single-pair-implicit-entries",
"label": "Spec Example 7.21. Single Pair Implicit Entries",
"error": false,
"tags": [
"flow",
"1.3-err",
"spec",
"mapping"
],
"files": {
"in_yaml": "- [ YAML : separate ]\n- [ : empty key entry ]\n- [ {JSON: like}:adjacent ]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+SEQ\n+MAP\n=VAL :YAML\n=VAL :separate\n-MAP\n-SEQ\n+SEQ\n+MAP\n=VAL :\n=VAL :empty key entry\n-MAP\n-SEQ\n+SEQ\n+MAP\n+MAP\n=VAL :JSON\n=VAL :like\n-MAP\n=VAL :adjacent\n-MAP\n-SEQ\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "9MMW",
"name": "spec-example-7-21-single-pair-implicit-entries-1-3",
"label": "Spec Example 7.21. Single Pair Implicit Entries [1.3",
"error": false,
"tags": [
"flow",
"spec",
"1.3-mod",
"mapping"
],
"files": {
"in_yaml": "- [ YAML : separate ]\n- [ : empty key entry ]\n- [ \"JSON like\":adjacent ]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+SEQ\n+MAP\n=VAL :YAML\n=VAL :separate\n-MAP\n-SEQ\n+SEQ\n+MAP\n=VAL :\n=VAL :empty key entry\n-MAP\n-SEQ\n+SEQ\n+MAP\n=VAL \"JSON like\n=VAL :adjacent\n-MAP\n-SEQ\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "Q88A",
"name": "spec-example-7-23-flow-content",
"label": "Spec Example 7.23. Flow Content",
"error": false,
"tags": [
"sequence",
"flow",
"spec",
"mapping"
],
"files": {
"in_yaml": "- [ a, b ]\n- { a: b }\n- \"a\"\n- 'b'\n- c\n",
"in_json": "[\n [\n \"a\",\n \"b\"\n ],\n {\n \"a\": \"b\"\n },\n \"a\",\n \"b\",\n \"c\"\n]\n",
"out_yaml": "- - a\n - b\n- a: b\n- \"a\"\n- 'b'\n- c\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+SEQ\n=VAL :a\n=VAL :b\n-SEQ\n+MAP\n=VAL :a\n=VAL :b\n-MAP\n=VAL \"a\n=VAL 'b\n=VAL :c\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "LE5A",
"name": "spec-example-7-24-flow-nodes",
"label": "Spec Example 7.24. Flow Nodes",
"error": false,
"tags": [
"flow",
"spec",
"alias",
"tag"
],
"files": {
"in_yaml": "- !!str \"a\"\n- 'b'\n- &anchor \"c\"\n- *anchor\n- !!str\n",
"in_json": "[\n \"a\",\n \"b\",\n \"c\",\n \"c\",\n \"\"\n]\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL <tag:yaml.org,2002:str> \"a\n=VAL 'b\n=VAL &anchor \"c\n=ALI *anchor\n=VAL <tag:yaml.org,2002:str> :\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "FRK4",
"name": "spec-example-7-3-completely-empty-flow-nodes",
"label": "Spec Example 7.3. Completely Empty Flow Nodes",
"error": false,
"tags": [
"flow",
"spec",
"scalar"
],
"files": {
"in_yaml": "{\n ? foo :,\n : bar,\n}\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n=VAL :\n=VAL :\n=VAL :bar\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "LQZ7",
"name": "spec-example-7-4-double-quoted-implicit-keys",
"label": "Spec Example 7.4. Double Quoted Implicit Keys",
"error": false,
"tags": [
"flow",
"spec",
"scalar"
],
"files": {
"in_yaml": "\"implicit block key\" : [\n \"implicit flow key\" : value,\n ]\n",
"in_json": "{\n \"implicit block key\": [\n {\n \"implicit flow key\": \"value\"\n }\n ]\n}\n",
"out_yaml": "\"implicit block key\":\n- \"implicit flow key\": value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL \"implicit block key\n+SEQ\n+MAP\n=VAL \"implicit flow key\n=VAL :value\n-MAP\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "NP9H",
"name": "spec-example-7-5-double-quoted-line-breaks",
"label": "Spec Example 7.5. Double Quoted Line Breaks",
"error": false,
"tags": [
"upto-1.2",
"spec",
"scalar"
],
"files": {
"in_yaml": "\"folded \nto a space,\t\n \nto a line feed, or \t\\\n \\ \tnon-content\"\n",
"in_json": "\"folded to a space,\\nto a line feed, or \\t \\tnon-content\"\n",
"out_yaml": "\"folded to a space,\\nto a line feed, or \\t \\tnon-content\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL \"folded to a space,\\nto a line feed, or \\t \\tnon-content\n-DOC\n-STR\n"
}
},
{
"id": "Q8AD",
"name": "spec-example-7-5-double-quoted-line-breaks-1-3",
"label": "Spec Example 7.5. Double Quoted Line Breaks [1.3]",
"error": false,
"tags": [
"spec",
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "---\n\"folded \nto a space,\n \nto a line feed, or \t\\\n \\ \tnon-content\"\n",
"in_json": "\"folded to a space,\\nto a line feed, or \\t \\tnon-content\"\n",
"out_yaml": "\"folded to a space,\\nto a line feed, or \\t \\tnon-content\"\n",
"emit_yaml": "--- \"folded to a space,\\nto a line feed, or \\t \\tnon-content\"\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL \"folded to a space,\\nto a line feed, or \\t \\tnon-content\n-DOC\n-STR\n"
}
},
{
"id": "7A4E",
"name": "spec-example-7-6-double-quoted-lines",
"label": "Spec Example 7.6. Double Quoted Lines",
"error": false,
"tags": [
"upto-1.2",
"spec",
"scalar"
],
"files": {
"in_yaml": "\" 1st non-empty\n\n 2nd non-empty \n\t3rd non-empty \"\n",
"in_json": "\" 1st non-empty\\n2nd non-empty 3rd non-empty \"\n",
"out_yaml": "\" 1st non-empty\\n2nd non-empty 3rd non-empty \"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL \" 1st non-empty\\n2nd non-empty 3rd non-empty \n-DOC\n-STR\n"
}
},
{
"id": "9TFX",
"name": "spec-example-7-6-double-quoted-lines-1-3",
"label": "Spec Example 7.6. Double Quoted Lines [1.3]",
"error": false,
"tags": [
"spec",
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "---\n\" 1st non-empty\n\n 2nd non-empty \n 3rd non-empty \"\n",
"in_json": "\" 1st non-empty\\n2nd non-empty 3rd non-empty \"\n",
"out_yaml": "\" 1st non-empty\\n2nd non-empty 3rd non-empty \"\n",
"emit_yaml": "--- \" 1st non-empty\\n2nd non-empty 3rd non-empty \"\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL \" 1st non-empty\\n2nd non-empty 3rd non-empty \n-DOC\n-STR\n"
}
},
{
"id": "4GC6",
"name": "spec-example-7-7-single-quoted-characters",
"label": "Spec Example 7.7. Single Quoted Characters",
"error": false,
"tags": [
"1.3-err",
"spec",
"scalar"
],
"files": {
"in_yaml": "'here''s to \"quotes\"'\n",
"in_json": "\"here's to \\\"quotes\\\"\"\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL 'here's to \"quotes\"\n-DOC\n-STR\n"
}
},
{
"id": "SSW6",
"name": "spec-example-7-7-single-quoted-characters-1-3",
"label": "Spec Example 7.7. Single Quoted Characters [1.3]",
"error": false,
"tags": [
"spec",
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "---\n'here''s to \"quotes\"'\n",
"in_json": "\"here's to \\\"quotes\\\"\"\n",
"out_yaml": "--- 'here''s to \"quotes\"'\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL 'here's to \"quotes\"\n-DOC\n-STR\n"
}
},
{
"id": "87E4",
"name": "spec-example-7-8-single-quoted-implicit-keys",
"label": "Spec Example 7.8. Single Quoted Implicit Keys",
"error": false,
"tags": [
"sequence",
"flow",
"spec",
"mapping"
],
"files": {
"in_yaml": "'implicit block key' : [\n 'implicit flow key' : value,\n ]\n",
"in_json": "{\n \"implicit block key\": [\n {\n \"implicit flow key\": \"value\"\n }\n ]\n}\n",
"out_yaml": "'implicit block key':\n- 'implicit flow key': value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL 'implicit block key\n+SEQ\n+MAP\n=VAL 'implicit flow key\n=VAL :value\n-MAP\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "PRH3",
"name": "spec-example-7-9-single-quoted-lines",
"label": "Spec Example 7.9. Single Quoted Lines",
"error": false,
"tags": [
"upto-1.2",
"spec",
"scalar"
],
"files": {
"in_yaml": "' 1st non-empty\n\n 2nd non-empty \n\t3rd non-empty '\n",
"in_json": "\" 1st non-empty\\n2nd non-empty 3rd non-empty \"\n",
"out_yaml": "' 1st non-empty\n\n 2nd non-empty 3rd non-empty '\n",
"emit_yaml": "' 1st non-empty\n\n 2nd non-empty 3rd non-empty '\n",
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL ' 1st non-empty\\n2nd non-empty 3rd non-empty \n-DOC\n-STR\n"
}
},
{
"id": "T4YY",
"name": "spec-example-7-9-single-quoted-lines-1-3",
"label": "Spec Example 7.9. Single Quoted Lines [1.3]",
"error": false,
"tags": [
"spec",
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "---\n' 1st non-empty\n\n 2nd non-empty \n 3rd non-empty '\n",
"in_json": "\" 1st non-empty\\n2nd non-empty 3rd non-empty \"\n",
"out_yaml": "' 1st non-empty\n\n 2nd non-empty 3rd non-empty '\n",
"emit_yaml": "--- ' 1st non-empty\n\n 2nd non-empty 3rd non-empty '\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL ' 1st non-empty\\n2nd non-empty 3rd non-empty \n-DOC\n-STR\n"
}
},
{
"id": "P2AD",
"name": "spec-example-8-1-block-scalar-header",
"label": "Spec Example 8.1. Block Scalar Header",
"error": false,
"tags": [
"comment",
"spec",
"literal",
"scalar",
"folded"
],
"files": {
"in_yaml": "- | # Empty header\u2193\n literal\n- >1 # Indentation indicator\u2193\n folded\n- |+ # Chomping indicator\u2193\n keep\n\n- >1- # Both indicators\u2193\n strip\n",
"in_json": "[\n \"literal\\n\",\n \" folded\\n\",\n \"keep\\n\\n\",\n \" strip\"\n]\n",
"out_yaml": "- |\n literal\n- >2\n folded\n- |+\n keep\n\n- >2-\n strip\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL |literal\\n\n=VAL > folded\\n\n=VAL |keep\\n\\n\n=VAL > strip\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "7T8X",
"name": "spec-example-8-10-folded-lines-8-13-final-empty-lines",
"label": "Spec Example 8.10. Folded Lines - 8.13. Final Empty Lines",
"error": false,
"tags": [
"1.3-err",
"comment",
"spec",
"scalar",
"folded"
],
"files": {
"in_yaml": ">\n\n folded\n line\n\n next\n line\n * bullet\n\n * list\n * lines\n\n last\n line\n\n# Comment\n",
"in_json": "\"\\nfolded line\\nnext line\\n * bullet\\n\\n * list\\n * lines\\n\\nlast line\\n\"\n",
"out_yaml": ">2\n\n folded line\n\n next line\n * bullet\n\n * list\n * lines\n\n last line\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL >\\nfolded line\\nnext line\\n * bullet\\n\\n * list\\n * lines\\n\\nlast line\\n\n-DOC\n-STR\n"
}
},
{
"id": "JQ4R",
"name": "spec-example-8-14-block-sequence",
"label": "Spec Example 8.14. Block Sequence",
"error": false,
"tags": [
"sequence",
"spec"
],
"files": {
"in_yaml": "block sequence:\n - one\n - two : three\n",
"in_json": "{\n \"block sequence\": [\n \"one\",\n {\n \"two\": \"three\"\n }\n ]\n}\n",
"out_yaml": "block sequence:\n- one\n- two: three\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :block sequence\n+SEQ\n=VAL :one\n+MAP\n=VAL :two\n=VAL :three\n-MAP\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "W42U",
"name": "spec-example-8-15-block-sequence-entry-types",
"label": "Spec Example 8.15. Block Sequence Entry Types",
"error": false,
"tags": [
"sequence",
"spec",
"literal"
],
"files": {
"in_yaml": "- # Empty\n- |\n block node\n- - one # Compact\n - two # sequence\n- one: two # Compact mapping\n",
"in_json": "[\n null,\n \"block node\\n\",\n [\n \"one\",\n \"two\"\n ],\n {\n \"one\": \"two\"\n }\n]\n",
"out_yaml": "-\n- |\n block node\n- - one\n - two\n- one: two\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL :\n=VAL |block node\\n\n+SEQ\n=VAL :one\n=VAL :two\n-SEQ\n+MAP\n=VAL :one\n=VAL :two\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "TE2A",
"name": "spec-example-8-16-block-mappings",
"label": "Spec Example 8.16. Block Mappings",
"error": false,
"tags": [
"spec",
"mapping"
],
"files": {
"in_yaml": "block mapping:\n key: value\n",
"in_json": "{\n \"block mapping\": {\n \"key\": \"value\"\n }\n}\n",
"out_yaml": "block mapping:\n key: value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :block mapping\n+MAP\n=VAL :key\n=VAL :value\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "5WE3",
"name": "spec-example-8-17-explicit-block-mapping-entries",
"label": "Spec Example 8.17. Explicit Block Mapping Entries",
"error": false,
"tags": [
"comment",
"spec",
"literal",
"mapping"
],
"files": {
"in_yaml": "? explicit key # Empty value\n? |\n block key\n: - one # Explicit compact\n - two # block value\n",
"in_json": "{\n \"explicit key\": null,\n \"block key\\n\": [\n \"one\",\n \"two\"\n ]\n}\n",
"out_yaml": "explicit key:\n? |\n block key\n: - one\n - two\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :explicit key\n=VAL :\n=VAL |block key\\n\n+SEQ\n=VAL :one\n=VAL :two\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "S3PD",
"name": "spec-example-8-18-implicit-block-mapping-entries",
"label": "Spec Example 8.18. Implicit Block Mapping Entries",
"error": false,
"tags": [
"spec",
"mapping"
],
"files": {
"in_yaml": "plain key: in-line value\n: # Both empty\n\"quoted key\":\n- entry\n",
"in_json": "{\n \"plain key\": \"in-line value\",\n \"\": null,\n \"quoted key\": [\n \"entry\"\n ]\n}\n",
"out_yaml": null,
"emit_yaml": "plain key: in-line value\n:\n\"quoted key\":\n- entry\n",
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :plain key\n=VAL :in-line value\n=VAL :\n=VAL :\n=VAL \"quoted key\n+SEQ\n=VAL :entry\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "V9D5",
"name": "spec-example-8-19-compact-block-mappings",
"label": "Spec Example 8.19. Compact Block Mappings",
"error": false,
"tags": [
"spec",
"mapping"
],
"files": {
"in_yaml": "- sun: yellow\n- ? earth: blue\n : moon: white\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :sun\n=VAL :yellow\n-MAP\n+MAP\n+MAP\n=VAL :earth\n=VAL :blue\n-MAP\n+MAP\n=VAL :moon\n=VAL :white\n-MAP\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "R4YG",
"name": "spec-example-8-2-block-indentation-indicator",
"label": "Spec Example 8.2. Block Indentation Indicator",
"error": false,
"tags": [
"upto-1.2",
"libyaml-err",
"spec",
"literal",
"scalar",
"folded"
],
"files": {
"in_yaml": "- |\n detected\n- >\n \n \n # detected\n- |1\n explicit\n- >\n \t\n detected\n",
"in_json": "[\n \"detected\\n\",\n \"\\n\\n# detected\\n\",\n \" explicit\\n\",\n \"\\t\\ndetected\\n\"\n]\n",
"out_yaml": "- |\n detected\n- >2\n\n\n # detected\n- |2\n explicit\n- \"\\t\\ndetected\\n\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL |detected\\n\n=VAL >\\n\\n# detected\\n\n=VAL | explicit\\n\n=VAL >\\t\\ndetected\\n\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "4QFQ",
"name": "spec-example-8-2-block-indentation-indicator-1-3",
"label": "Spec Example 8.2. Block Indentation Indicator [1.3]",
"error": false,
"tags": [
"libyaml-err",
"spec",
"literal",
"scalar",
"folded",
"1.3-mod"
],
"files": {
"in_yaml": "- |\n detected\n- >\n \n \n # detected\n- |1\n explicit\n- >\n detected\n",
"in_json": "[\n \"detected\\n\",\n \"\\n\\n# detected\\n\",\n \" explicit\\n\",\n \"detected\\n\"\n]\n",
"out_yaml": "- |\n detected\n- >2\n\n\n # detected\n- |2\n explicit\n- \"detected\\n\"\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL |detected\\n\n=VAL >\\n\\n# detected\\n\n=VAL | explicit\\n\n=VAL >detected\\n\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "735Y",
"name": "spec-example-8-20-block-node-types",
"label": "Spec Example 8.20. Block Node Types",
"error": false,
"tags": [
"spec",
"folded"
],
"files": {
"in_yaml": "-\n \"flow in block\"\n- >\n Block scalar\n- !!map # Block collection\n foo : bar\n",
"in_json": "[\n \"flow in block\",\n \"Block scalar\\n\",\n {\n \"foo\": \"bar\"\n }\n]\n",
"out_yaml": "- \"flow in block\"\n- >\n Block scalar\n- !!map\n foo: bar\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL \"flow in block\n=VAL >Block scalar\\n\n+MAP <tag:yaml.org,2002:map>\n=VAL :foo\n=VAL :bar\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "M5C3",
"name": "spec-example-8-21-block-scalar-nodes",
"label": "Spec Example 8.21. Block Scalar Nodes",
"error": false,
"tags": [
"1.3-err",
"spec",
"literal",
"folded"
],
"files": {
"in_yaml": "literal: |2\n value\nfolded:\n !foo\n >1\n value\n",
"in_json": "{\n \"literal\": \"value\\n\",\n \"folded\": \"value\\n\"\n}\n",
"out_yaml": "literal: |\n value\nfolded: !foo >\n value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :literal\n=VAL |value\\n\n=VAL :folded\n=VAL <!foo> >value\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "Z67P",
"name": "spec-example-8-21-block-scalar-nodes-1-3",
"label": "Spec Example 8.21. Block Scalar Nodes [1.3]",
"error": false,
"tags": [
"spec",
"literal",
"folded",
"1.3-mod"
],
"files": {
"in_yaml": "literal: |2\n value\nfolded: !foo >1\n value\n",
"in_json": "{\n \"literal\": \"value\\n\",\n \"folded\": \"value\\n\"\n}\n",
"out_yaml": "literal: |\n value\nfolded: !foo >\n value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :literal\n=VAL |value\\n\n=VAL :folded\n=VAL <!foo> >value\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "57H4",
"name": "spec-example-8-22-block-collection-nodes",
"label": "Spec Example 8.22. Block Collection Nodes",
"error": false,
"tags": [
"sequence",
"tag",
"mapping"
],
"files": {
"in_yaml": "sequence: !!seq\n- entry\n- !!seq\n - nested\nmapping: !!map\n foo: bar\n",
"in_json": "{\n \"sequence\": [\n \"entry\",\n [\n \"nested\"\n ]\n ],\n \"mapping\": {\n \"foo\": \"bar\"\n }\n}\n",
"out_yaml": "sequence: !!seq\n- entry\n- !!seq\n - nested\nmapping: !!map\n foo: bar\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :sequence\n+SEQ <tag:yaml.org,2002:seq>\n=VAL :entry\n+SEQ <tag:yaml.org,2002:seq>\n=VAL :nested\n-SEQ\n-SEQ\n=VAL :mapping\n+MAP <tag:yaml.org,2002:map>\n=VAL :foo\n=VAL :bar\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "A6F9",
"name": "spec-example-8-4-chomping-final-line-break",
"label": "Spec Example 8.4. Chomping Final Line Break",
"error": false,
"tags": [
"spec",
"literal",
"scalar"
],
"files": {
"in_yaml": "strip: |-\n text\nclip: |\n text\nkeep: |+\n text\n",
"in_json": "{\n \"strip\": \"text\",\n \"clip\": \"text\\n\",\n \"keep\": \"text\\n\"\n}\n",
"out_yaml": "strip: |-\n text\nclip: |\n text\nkeep: |\n text\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :strip\n=VAL |text\n=VAL :clip\n=VAL |text\\n\n=VAL :keep\n=VAL |text\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "F8F9",
"name": "spec-example-8-5-chomping-trailing-lines",
"label": "Spec Example 8.5. Chomping Trailing Lines",
"error": false,
"tags": [
"comment",
"spec",
"literal",
"scalar"
],
"files": {
"in_yaml": " # Strip\n # Comments:\nstrip: |-\n # text\n \n # Clip\n # comments:\n\nclip: |\n # text\n \n # Keep\n # comments:\n\nkeep: |+\n # text\n\n # Trail\n # comments.\n",
"in_json": "{\n \"strip\": \"# text\",\n \"clip\": \"# text\\n\",\n \"keep\": \"# text\\n\\n\"\n}\n",
"out_yaml": "strip: |-\n # text\nclip: |\n # text\nkeep: |+\n # text\n\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :strip\n=VAL |# text\n=VAL :clip\n=VAL |# text\\n\n=VAL :keep\n=VAL |# text\\n\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "K858",
"name": "spec-example-8-6-empty-scalar-chomping",
"label": "Spec Example 8.6. Empty Scalar Chomping",
"error": false,
"tags": [
"spec",
"whitespace",
"literal",
"folded"
],
"files": {
"in_yaml": "strip: >-\n\nclip: >\n\nkeep: |+\n\n",
"in_json": "{\n \"strip\": \"\",\n \"clip\": \"\",\n \"keep\": \"\\n\"\n}\n",
"out_yaml": "strip: \"\"\nclip: \"\"\nkeep: |2+\n\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :strip\n=VAL >\n=VAL :clip\n=VAL >\n=VAL :keep\n=VAL |\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "M9B4",
"name": "spec-example-8-7-literal-scalar",
"label": "Spec Example 8.7. Literal Scalar",
"error": false,
"tags": [
"1.3-err",
"spec",
"literal",
"scalar"
],
"files": {
"in_yaml": "|\n literal\n \ttext\n\n\n",
"in_json": "\"literal\\n\\ttext\\n\"\n",
"out_yaml": "|\n literal\n \ttext\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL |literal\\n\\ttext\\n\n-DOC\n-STR\n"
}
},
{
"id": "T5N4",
"name": "spec-example-8-7-literal-scalar-1-3",
"label": "Spec Example 8.7. Literal Scalar [1.3]",
"error": false,
"tags": [
"spec",
"literal",
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "--- |\n literal\n \ttext\n\n\n",
"in_json": "\"literal\\n\\ttext\\n\"\n",
"out_yaml": "\"literal\\n\\ttext\\n\"\n",
"emit_yaml": "--- |\n literal\n \ttext\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL |literal\\n\\ttext\\n\n-DOC\n-STR\n"
}
},
{
"id": "DWX9",
"name": "spec-example-8-8-literal-content",
"label": "Spec Example 8.8. Literal Content",
"error": false,
"tags": [
"1.3-err",
"comment",
"spec",
"literal",
"scalar"
],
"files": {
"in_yaml": "|\n \n \n literal\n \n \n text\n\n # Comment\n",
"in_json": "\"\\n\\nliteral\\n \\n\\ntext\\n\"\n",
"out_yaml": "\"\\n\\nliteral\\n \\n\\ntext\\n\"\n",
"emit_yaml": "|\n\n\n literal\n \n\n text\n",
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL |\\n\\nliteral\\n \\n\\ntext\\n\n-DOC\n-STR\n"
}
},
{
"id": "T26H",
"name": "spec-example-8-8-literal-content-1-3",
"label": "Spec Example 8.8. Literal Content [1.3]",
"error": false,
"tags": [
"comment",
"spec",
"literal",
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "--- |\n \n \n literal\n \n \n text\n\n # Comment\n",
"in_json": "\"\\n\\nliteral\\n \\n\\ntext\\n\"\n",
"out_yaml": "\"\\n\\nliteral\\n \\n\\ntext\\n\"\n",
"emit_yaml": "--- |\n\n\n literal\n \n\n text\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL |\\n\\nliteral\\n \\n\\ntext\\n\n-DOC\n-STR\n"
}
},
{
"id": "G992",
"name": "spec-example-8-9-folded-scalar",
"label": "Spec Example 8.9. Folded Scalar",
"error": false,
"tags": [
"1.3-err",
"spec",
"scalar",
"folded"
],
"files": {
"in_yaml": ">\n folded\n text\n\n\n",
"in_json": "\"folded text\\n\"\n",
"out_yaml": ">\n folded text\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL >folded text\\n\n-DOC\n-STR\n"
}
},
{
"id": "B3HG",
"name": "spec-example-8-9-folded-scalar-1-3",
"label": "Spec Example 8.9. Folded Scalar [1.3]",
"error": false,
"tags": [
"spec",
"scalar",
"folded",
"1.3-mod"
],
"files": {
"in_yaml": "--- >\n folded\n text\n\n\n",
"in_json": "\"folded text\\n\"\n",
"out_yaml": ">\n folded text\n",
"emit_yaml": "--- >\n folded text\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL >folded text\\n\n-DOC\n-STR\n"
}
},
{
"id": "RTP8",
"name": "spec-example-9-2-document-markers",
"label": "Spec Example 9.2. Document Markers",
"error": false,
"tags": [
"footer",
"spec",
"header"
],
"files": {
"in_yaml": "%YAML 1.2\n---\nDocument\n... # Suffix\n",
"in_json": "\"Document\"\n",
"out_yaml": "--- Document\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :Document\n-DOC ...\n-STR\n"
}
},
{
"id": "M7A3",
"name": "spec-example-9-3-bare-documents",
"label": "Spec Example 9.3. Bare Documents",
"error": false,
"tags": [
"footer",
"1.3-err",
"spec"
],
"files": {
"in_yaml": "Bare\ndocument\n...\n# No document\n...\n|\n%!PS-Adobe-2.0 # Not the first line\n",
"in_json": "\"Bare document\"\n\"%!PS-Adobe-2.0 # Not the first line\\n\"\n",
"out_yaml": null,
"emit_yaml": "Bare document\n...\n|\n %!PS-Adobe-2.0 # Not the first line\n",
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL :Bare document\n-DOC ...\n+DOC\n=VAL |%!PS-Adobe-2.0 # Not the first line\\n\n-DOC\n-STR\n"
}
},
{
"id": "UT92",
"name": "spec-example-9-4-explicit-documents",
"label": "Spec Example 9.4. Explicit Documents",
"error": false,
"tags": [
"footer",
"comment",
"spec",
"header"
],
"files": {
"in_yaml": "---\n{ matches\n% : 20 }\n...\n---\n# Empty\n...\n",
"in_json": "{\n \"matches %\": 20\n}\nnull\n",
"out_yaml": "---\nmatches %: 20\n...\n---\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :matches %\n=VAL :20\n-MAP\n-DOC ...\n+DOC ---\n=VAL :\n-DOC ...\n-STR\n"
}
},
{
"id": "W4TN",
"name": "spec-example-9-5-directives-documents",
"label": "Spec Example 9.5. Directives Documents",
"error": false,
"tags": [
"footer",
"1.3-err",
"spec",
"header"
],
"files": {
"in_yaml": "%YAML 1.2\n--- |\n%!PS-Adobe-2.0\n...\n%YAML 1.2\n---\n# Empty\n...\n",
"in_json": "\"%!PS-Adobe-2.0\\n\"\nnull\n",
"out_yaml": "--- |\n %!PS-Adobe-2.0\n...\n---\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL |%!PS-Adobe-2.0\\n\n-DOC ...\n+DOC ---\n=VAL :\n-DOC ...\n-STR\n"
}
},
{
"id": "6ZKB",
"name": "spec-example-9-6-stream",
"label": "Spec Example 9.6. Stream",
"error": false,
"tags": [
"1.3-err",
"spec",
"header"
],
"files": {
"in_yaml": "Document\n---\n# Empty\n...\n%YAML 1.2\n---\nmatches %: 20\n",
"in_json": "\"Document\"\nnull\n{\n \"matches %\": 20\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL :Document\n-DOC\n+DOC ---\n=VAL :\n-DOC ...\n+DOC ---\n+MAP\n=VAL :matches %\n=VAL :20\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "9DXL",
"name": "spec-example-9-6-stream-1-3",
"label": "Spec Example 9.6. Stream [1.3]",
"error": false,
"tags": [
"spec",
"header",
"1.3-mod"
],
"files": {
"in_yaml": "Mapping: Document\n---\n# Empty\n...\n%YAML 1.2\n---\nmatches %: 20\n",
"in_json": "{\n \"Mapping\": \"Document\"\n}\nnull\n{\n \"matches %\": 20\n}\n",
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :Mapping\n=VAL :Document\n-MAP\n-DOC\n+DOC ---\n=VAL :\n-DOC ...\n+DOC ---\n+MAP\n=VAL :matches %\n=VAL :20\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "K54U",
"name": "tab-after-document-header",
"label": "Tab after document header",
"error": false,
"tags": [
"whitespace",
"header"
],
"files": {
"in_yaml": "---\tscalar\n",
"in_json": "\"scalar\"\n",
"out_yaml": "--- scalar\n...\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :scalar\n-DOC\n-STR\n"
}
},
{
"id": "Q5MG",
"name": "tab-at-beginning-of-line-followed-by-a-flow-mapping",
"label": "Tab at beginning of line followed by a flow mapping",
"error": false,
"tags": [
"flow",
"whitespace"
],
"files": {
"in_yaml": "\t{}\n",
"in_json": "{}\n",
"out_yaml": "{}\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "QLJ7",
"name": "tag-shorthand-used-in-documents-but-only-defined-in-the-first",
"label": "Tag shorthand used in documents but only defined in the first",
"error": true,
"tags": [
"error",
"directive",
"tag"
],
"files": {
"in_yaml": "%TAG !prefix! tag:example.com,2011:\n--- !prefix!A\na: b\n--- !prefix!B\nc: d\n--- !prefix!C\ne: f\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP <tag:example.com,2011:A>\n=VAL :a\n=VAL :b\n-MAP\n-DOC\n+DOC ---\n"
}
},
{
"id": "6JWB",
"name": "tags-for-block-objects",
"label": "Tags for Block Objects",
"error": false,
"tags": [
"tag"
],
"files": {
"in_yaml": "foo: !!seq\n - !!str a\n - !!map\n key: !!str value\n",
"in_json": "{\n \"foo\": [\n \"a\",\n {\n \"key\": \"value\"\n }\n ]\n}\n",
"out_yaml": "foo: !!seq\n- !!str a\n- !!map\n key: !!str value\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :foo\n+SEQ <tag:yaml.org,2002:seq>\n=VAL <tag:yaml.org,2002:str> :a\n+MAP <tag:yaml.org,2002:map>\n=VAL :key\n=VAL <tag:yaml.org,2002:str> :value\n-MAP\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "EHF6",
"name": "tags-for-flow-objects",
"label": "Tags for Flow Objects",
"error": false,
"tags": [
"flow",
"tag"
],
"files": {
"in_yaml": "!!map {\n k: !!seq\n [ a, !!str b]\n}\n",
"in_json": "{\n \"k\": [\n \"a\",\n \"b\"\n ]\n}\n",
"out_yaml": "!!map\nk: !!seq\n- a\n- !!str b\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP <tag:yaml.org,2002:map>\n=VAL :k\n+SEQ <tag:yaml.org,2002:seq>\n=VAL :a\n=VAL <tag:yaml.org,2002:str> :b\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "35KP",
"name": "tags-for-root-objects",
"label": "Tags for Root Objects",
"error": false,
"tags": [
"tag"
],
"files": {
"in_yaml": "--- !!map\n? a\n: b\n--- !!seq\n- !!str c\n--- !!str\nd\ne\n",
"in_json": "{\n \"a\": \"b\"\n}\n[\n \"c\"\n]\n\"d e\"\n",
"out_yaml": "--- !!map\na: b\n--- !!seq\n- !!str c\n--- !!str d e\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP <tag:yaml.org,2002:map>\n=VAL :a\n=VAL :b\n-MAP\n-DOC\n+DOC ---\n+SEQ <tag:yaml.org,2002:seq>\n=VAL <tag:yaml.org,2002:str> :c\n-SEQ\n-DOC\n+DOC ---\n=VAL <tag:yaml.org,2002:str> :d e\n-DOC\n-STR\n"
}
},
{
"id": "2AUY",
"name": "tags-in-block-sequence",
"label": "Tags in Block Sequence",
"error": false,
"tags": [
"sequence",
"tag"
],
"files": {
"in_yaml": " - !!str a\n - b\n - !!int 42\n - d\n",
"in_json": "[\n \"a\",\n \"b\",\n 42,\n \"d\"\n]\n",
"out_yaml": "- !!str a\n- b\n- !!int 42\n- d\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL <tag:yaml.org,2002:str> :a\n=VAL :b\n=VAL <tag:yaml.org,2002:int> :42\n=VAL :d\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "L94M",
"name": "tags-in-explicit-mapping",
"label": "Tags in Explicit Mapping",
"error": false,
"tags": [
"tag",
"mapping"
],
"files": {
"in_yaml": "? !!str a\n: !!int 47\n? c\n: !!str d\n",
"in_json": "{\n \"a\": 47,\n \"c\": \"d\"\n}\n",
"out_yaml": "!!str a: !!int 47\nc: !!str d\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL <tag:yaml.org,2002:str> :a\n=VAL <tag:yaml.org,2002:int> :47\n=VAL :c\n=VAL <tag:yaml.org,2002:str> :d\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "74H7",
"name": "tags-in-implicit-mapping",
"label": "Tags in Implicit Mapping",
"error": false,
"tags": [
"tag",
"mapping"
],
"files": {
"in_yaml": "!!str a: b\nc: !!int 42\ne: !!str f\ng: h\n!!int 23: !!bool false\n",
"in_json": "{\n \"a\": \"b\",\n \"c\": 42,\n \"e\": \"f\",\n \"g\": \"h\",\n \"23\": false\n}\n",
"out_yaml": "!!str a: b\nc: !!int 42\ne: !!str f\ng: h\n!!int 23: !!bool false\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL <tag:yaml.org,2002:str> :a\n=VAL :b\n=VAL :c\n=VAL <tag:yaml.org,2002:int> :42\n=VAL :e\n=VAL <tag:yaml.org,2002:str> :f\n=VAL :g\n=VAL :h\n=VAL <tag:yaml.org,2002:int> :23\n=VAL <tag:yaml.org,2002:bool> :false\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "FH7J",
"name": "tags-on-empty-scalars",
"label": "Tags on Empty Scalars",
"error": false,
"tags": [
"scalar",
"tag"
],
"files": {
"in_yaml": "- !!str\n-\n !!null : a\n b: !!str\n- !!str : !!null\n",
"in_json": null,
"out_yaml": "- !!str\n- !!null : a\n b: !!str\n- !!str : !!null\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n=VAL <tag:yaml.org,2002:str> :\n+MAP\n=VAL <tag:yaml.org,2002:null> :\n=VAL :a\n=VAL :b\n=VAL <tag:yaml.org,2002:str> :\n-MAP\n+MAP\n=VAL <tag:yaml.org,2002:str> :\n=VAL <tag:yaml.org,2002:null> :\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "82AN",
"name": "three-dashes-and-content-without-space",
"label": "Three dashes and content without space",
"error": false,
"tags": [
"1.3-err",
"scalar"
],
"files": {
"in_yaml": "---word1\nword2\n",
"in_json": "\"---word1 word2\"\n",
"out_yaml": "'---word1 word2'\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n=VAL :---word1 word2\n-DOC\n-STR\n"
}
},
{
"id": "EXG3",
"name": "three-dashes-and-content-without-space-1-3",
"label": "Three dashes and content without space [1.3]",
"error": false,
"tags": [
"scalar",
"1.3-mod"
],
"files": {
"in_yaml": "---\n---word1\nword2\n",
"in_json": "\"---word1 word2\"\n",
"out_yaml": "'---word1 word2'\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :---word1 word2\n-DOC\n-STR\n"
}
},
{
"id": "BF9H",
"name": "trailing-comment-in-multiline-plain-scalar",
"label": "Trailing comment in multiline plain scalar",
"error": true,
"tags": [
"error",
"comment",
"scalar"
],
"files": {
"in_yaml": "---\nplain: a\n b # end of scalar\n c\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :plain\n=VAL :a b\n"
}
},
{
"id": "Q4CL",
"name": "trailing-content-after-quoted-value",
"label": "Trailing content after quoted value",
"error": true,
"tags": [
"error",
"double",
"mapping"
],
"files": {
"in_yaml": "key1: \"quoted1\"\nkey2: \"quoted2\" trailing content\nkey3: \"quoted3\"\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key1\n=VAL \"quoted1\n=VAL :key2\n=VAL \"quoted2\n"
}
},
{
"id": "JY7Z",
"name": "trailing-content-that-looks-like-a-mapping",
"label": "Trailing content that looks like a mapping",
"error": true,
"tags": [
"error",
"double",
"mapping"
],
"files": {
"in_yaml": "key1: \"quoted1\"\nkey2: \"quoted2\" no key: nor value\nkey3: \"quoted3\"\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key1\n=VAL \"quoted1\n=VAL :key2\n=VAL \"quoted2\n"
}
},
{
"id": "6XDY",
"name": "two-document-start-markers",
"label": "Two document start markers",
"error": false,
"tags": [
"header"
],
"files": {
"in_yaml": "---\n---\n",
"in_json": "null\nnull\n",
"out_yaml": "---\n---\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL :\n-DOC\n+DOC ---\n=VAL :\n-DOC\n-STR\n"
}
},
{
"id": "KK5P",
"name": "various-combinations-of-explicit-block-mappings",
"label": "Various combinations of explicit block mappings",
"error": false,
"tags": [
"sequence",
"mapping"
],
"files": {
"in_yaml": "complex1:\n ? - a\ncomplex2:\n ? - a\n : b\ncomplex3:\n ? - a\n : >\n b\ncomplex4:\n ? >\n a\n :\ncomplex5:\n ? - a\n : - b\n",
"in_json": null,
"out_yaml": "complex1:\n ? - a\n :\ncomplex2:\n ? - a\n : b\ncomplex3:\n ? - a\n : >\n b\ncomplex4:\n ? >\n a\n :\ncomplex5:\n ? - a\n : - b\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :complex1\n+MAP\n+SEQ\n=VAL :a\n-SEQ\n=VAL :\n-MAP\n=VAL :complex2\n+MAP\n+SEQ\n=VAL :a\n-SEQ\n=VAL :b\n-MAP\n=VAL :complex3\n+MAP\n+SEQ\n=VAL :a\n-SEQ\n=VAL >b\\n\n-MAP\n=VAL :complex4\n+MAP\n=VAL >a\\n\n=VAL :\n-MAP\n=VAL :complex5\n+MAP\n+SEQ\n=VAL :a\n-SEQ\n+SEQ\n=VAL :b\n-SEQ\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "9KAX",
"name": "various-combinations-of-tags-and-anchors",
"label": "Various combinations of tags and anchors",
"error": false,
"tags": [
"1.3-err",
"anchor",
"mapping"
],
"files": {
"in_yaml": "---\n&a1\n!!str\nscalar1\n---\n!!str\n&a2\nscalar2\n---\n&a3\n!!str scalar3\n---\n&a4 !!map\n&a5 !!str key5: value4\n---\na6: 1\n&anchor6 b6: 2\n---\n!!map\n&a8 !!str key8: value7\n---\n!!map\n!!str &a10 key10: value9\n---\n!!str &a11\nvalue11\n",
"in_json": "\"scalar1\"\n\"scalar2\"\n\"scalar3\"\n{\n \"key5\": \"value4\"\n}\n{\n \"a6\": 1,\n \"b6\": 2\n}\n{\n \"key8\": \"value7\"\n}\n{\n \"key10\": \"value9\"\n}\n\"value11\"\n",
"out_yaml": "--- &a1 !!str scalar1\n--- &a2 !!str scalar2\n--- &a3 !!str scalar3\n--- &a4 !!map\n&a5 !!str key5: value4\n---\na6: 1\n&anchor6 b6: 2\n--- !!map\n&a8 !!str key8: value7\n--- !!map\n&a10 !!str key10: value9\n--- &a11 !!str value11\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL &a1 <tag:yaml.org,2002:str> :scalar1\n-DOC\n+DOC ---\n=VAL &a2 <tag:yaml.org,2002:str> :scalar2\n-DOC\n+DOC ---\n=VAL &a3 <tag:yaml.org,2002:str> :scalar3\n-DOC\n+DOC ---\n+MAP &a4 <tag:yaml.org,2002:map>\n=VAL &a5 <tag:yaml.org,2002:str> :key5\n=VAL :value4\n-MAP\n-DOC\n+DOC ---\n+MAP\n=VAL :a6\n=VAL :1\n=VAL &anchor6 :b6\n=VAL :2\n-MAP\n-DOC\n+DOC ---\n+MAP <tag:yaml.org,2002:map>\n=VAL &a8 <tag:yaml.org,2002:str> :key8\n=VAL :value7\n-MAP\n-DOC\n+DOC ---\n+MAP <tag:yaml.org,2002:map>\n=VAL &a10 <tag:yaml.org,2002:str> :key10\n=VAL :value9\n-MAP\n-DOC\n+DOC ---\n=VAL &a11 <tag:yaml.org,2002:str> :value11\n-DOC\n-STR\n"
}
},
{
"id": "NAT4",
"name": "various-empty-or-newline-only-quoted-strings",
"label": "Various empty or newline only quoted strings",
"error": false,
"tags": [
"single",
"whitespace",
"scalar",
"double"
],
"files": {
"in_yaml": "---\na: '\n '\nb: ' \n '\nc: \"\n \"\nd: \" \n \"\ne: '\n\n '\nf: \"\n\n \"\ng: '\n\n\n '\nh: \"\n\n\n \"\n",
"in_json": "{\n \"a\": \" \",\n \"b\": \" \",\n \"c\": \" \",\n \"d\": \" \",\n \"e\": \"\\n\",\n \"f\": \"\\n\",\n \"g\": \"\\n\\n\",\n \"h\": \"\\n\\n\"\n}\n",
"out_yaml": null,
"emit_yaml": "---\na: ' '\nb: ' '\nc: \" \"\nd: \" \"\ne: '\n\n '\nf: \"\\n\"\ng: '\n\n\n '\nh: \"\\n\\n\"\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :a\n=VAL ' \n=VAL :b\n=VAL ' \n=VAL :c\n=VAL \" \n=VAL :d\n=VAL \" \n=VAL :e\n=VAL '\\n\n=VAL :f\n=VAL \"\\n\n=VAL :g\n=VAL '\\n\\n\n=VAL :h\n=VAL \"\\n\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "CN3R",
"name": "various-location-of-anchors-in-flow-sequence",
"label": "Various location of anchors in flow sequence",
"error": false,
"tags": [
"flow",
"anchor"
],
"files": {
"in_yaml": "&flowseq [\n a: b,\n &c c: d,\n { &e e: f },\n &g { g: h }\n]\n",
"in_json": "[\n {\n \"a\": \"b\"\n },\n {\n \"c\": \"d\"\n },\n {\n \"e\": \"f\"\n },\n {\n \"g\": \"h\"\n }\n]\n",
"out_yaml": "&flowseq\n- a: b\n- &c c: d\n- &e e: f\n- &g\n g: h\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ &flowseq\n+MAP\n=VAL :a\n=VAL :b\n-MAP\n+MAP\n=VAL &c :c\n=VAL :d\n-MAP\n+MAP\n=VAL &e :e\n=VAL :f\n-MAP\n+MAP &g\n=VAL :g\n=VAL :h\n-MAP\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "XW4D",
"name": "various-trailing-comments",
"label": "Various Trailing Comments",
"error": false,
"tags": [
"1.3-err",
"comment"
],
"files": {
"in_yaml": "a: \"double\n quotes\" # lala\nb: plain\n value # lala\nc : #lala\n d\n? # lala\n - seq1\n: # lala\n - #lala\n seq2\ne:\n &node # lala\n - x: y\nblock: > # lala\n abcde\n",
"in_json": null,
"out_yaml": "a: \"double quotes\"\nb: plain value\nc: d\n? - seq1\n: - seq2\ne: &node\n- x: y\nblock: >\n abcde\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n=VAL \"double quotes\n=VAL :b\n=VAL :plain value\n=VAL :c\n=VAL :d\n+SEQ\n=VAL :seq1\n-SEQ\n+SEQ\n=VAL :seq2\n-SEQ\n=VAL :e\n+SEQ &node\n+MAP\n=VAL :x\n=VAL :y\n-MAP\n-SEQ\n=VAL :block\n=VAL >abcde\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "RZP5",
"name": "various-trailing-comments-1-3",
"label": "Various Trailing Comments [1.3]",
"error": false,
"tags": [
"comment",
"1.3-mod"
],
"files": {
"in_yaml": "a: \"double\n quotes\" # lala\nb: plain\n value # lala\nc : #lala\n d\n? # lala\n - seq1\n: # lala\n - #lala\n seq2\ne: &node # lala\n - x: y\nblock: > # lala\n abcde\n",
"in_json": null,
"out_yaml": "a: \"double quotes\"\nb: plain value\nc: d\n? - seq1\n: - seq2\ne: &node\n- x: y\nblock: >\n abcde\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n=VAL \"double quotes\n=VAL :b\n=VAL :plain value\n=VAL :c\n=VAL :d\n+SEQ\n=VAL :seq1\n-SEQ\n+SEQ\n=VAL :seq2\n-SEQ\n=VAL :e\n+SEQ &node\n+MAP\n=VAL :x\n=VAL :y\n-MAP\n-SEQ\n=VAL :block\n=VAL >abcde\\n\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "DC7X",
"name": "various-trailing-tabs",
"label": "Various trailing tabs",
"error": false,
"tags": [
"comment",
"whitespace"
],
"files": {
"in_yaml": "a: b\t\nseq:\t\n - a\t\nc: d\t#X\n",
"in_json": "{\n \"a\": \"b\",\n \"seq\": [\n \"a\"\n ],\n \"c\": \"d\"\n}\n",
"out_yaml": "a: b\nseq:\n- a\nc: d\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :a\n=VAL :b\n=VAL :seq\n+SEQ\n=VAL :a\n-SEQ\n=VAL :c\n=VAL :d\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "LP6E",
"name": "whitespace-after-scalars-in-flow",
"label": "Whitespace After Scalars in Flow",
"error": false,
"tags": [
"flow",
"whitespace",
"scalar"
],
"files": {
"in_yaml": "- [a, b , c ]\n- { \"a\" : b\n , c : 'd' ,\n e : \"f\"\n }\n- [ ]\n",
"in_json": "[\n [\n \"a\",\n \"b\",\n \"c\"\n ],\n {\n \"a\": \"b\",\n \"c\": \"d\",\n \"e\": \"f\"\n },\n []\n]\n",
"out_yaml": "- - a\n - b\n - c\n- \"a\": b\n c: 'd'\n e: \"f\"\n- []\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+SEQ\n=VAL :a\n=VAL :b\n=VAL :c\n-SEQ\n+MAP\n=VAL \"a\n=VAL :b\n=VAL :c\n=VAL 'd\n=VAL :e\n=VAL \"f\n-MAP\n+SEQ\n-SEQ\n-SEQ\n-DOC\n-STR\n"
}
},
{
"id": "26DV",
"name": "whitespace-around-colon-in-mappings",
"label": "Whitespace around colon in mappings",
"error": false,
"tags": [
"alias",
"whitespace",
"mapping"
],
"files": {
"in_yaml": "\"top1\" : \n \"key1\" : &alias1 scalar1\n'top2' : \n 'key2' : &alias2 scalar2\ntop3: &node3 \n *alias1 : scalar3\ntop4: \n *alias2 : scalar4\ntop5 : \n scalar5\ntop6: \n &anchor6 'key6' : scalar6\n",
"in_json": "{\n \"top1\": {\n \"key1\": \"scalar1\"\n },\n \"top2\": {\n \"key2\": \"scalar2\"\n },\n \"top3\": {\n \"scalar1\": \"scalar3\"\n },\n \"top4\": {\n \"scalar2\": \"scalar4\"\n },\n \"top5\": \"scalar5\",\n \"top6\": {\n \"key6\": \"scalar6\"\n }\n}\n",
"out_yaml": "\"top1\":\n \"key1\": &alias1 scalar1\n'top2':\n 'key2': &alias2 scalar2\ntop3: &node3\n *alias1 : scalar3\ntop4:\n *alias2 : scalar4\ntop5: scalar5\ntop6:\n &anchor6 'key6': scalar6\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL \"top1\n+MAP\n=VAL \"key1\n=VAL &alias1 :scalar1\n-MAP\n=VAL 'top2\n+MAP\n=VAL 'key2\n=VAL &alias2 :scalar2\n-MAP\n=VAL :top3\n+MAP &node3\n=ALI *alias1\n=VAL :scalar3\n-MAP\n=VAL :top4\n+MAP\n=ALI *alias2\n=VAL :scalar4\n-MAP\n=VAL :top5\n=VAL :scalar5\n=VAL :top6\n+MAP\n=VAL &anchor6 'key6\n=VAL :scalar6\n-MAP\n-MAP\n-DOC\n-STR\n"
}
},
{
"id": "DMG6",
"name": "wrong-indendation-in-map",
"label": "Wrong indendation in Map",
"error": true,
"tags": [
"error",
"indent",
"mapping"
],
"files": {
"in_yaml": "key:\n ok: 1\n wrong: 2\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n+MAP\n=VAL :ok\n=VAL :1\n-MAP\n"
}
},
{
"id": "EW3V",
"name": "wrong-indendation-in-mapping",
"label": "Wrong indendation in mapping",
"error": true,
"tags": [
"error",
"indent",
"mapping"
],
"files": {
"in_yaml": "k1: v1\n k2: v2\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :k1\n"
}
},
{
"id": "4HVU",
"name": "wrong-indendation-in-sequence",
"label": "Wrong indendation in Sequence",
"error": true,
"tags": [
"sequence",
"error",
"indent"
],
"files": {
"in_yaml": "key:\n - ok\n - also ok\n - wrong\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+MAP\n=VAL :key\n+SEQ\n=VAL :ok\n=VAL :also ok\n-SEQ\n"
}
},
{
"id": "9C9N",
"name": "wrong-indented-flow-sequence",
"label": "Wrong indented flow sequence",
"error": true,
"tags": [
"sequence",
"error",
"indent",
"flow"
],
"files": {
"in_yaml": "---\nflow: [a,\nb,\nc]\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :flow\n+SEQ\n=VAL :a\n"
}
},
{
"id": "QB6E",
"name": "wrong-indented-multiline-quoted-scalar",
"label": "Wrong indented multiline quoted scalar",
"error": true,
"tags": [
"error",
"indent",
"double"
],
"files": {
"in_yaml": "---\nquoted: \"a\nb\nc\"\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :quoted\n"
}
},
{
"id": "ZVH3",
"name": "wrong-indented-sequence-item",
"label": "Wrong indented sequence item",
"error": true,
"tags": [
"sequence",
"error",
"indent"
],
"files": {
"in_yaml": "- key: value\n - item1\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC\n+SEQ\n+MAP\n=VAL :key\n=VAL :value\n-MAP\n"
}
},
{
"id": "RHX7",
"name": "yaml-directive-without-document-end-marker",
"label": "YAML directive without document end marker",
"error": true,
"tags": [
"error",
"directive"
],
"files": {
"in_yaml": "---\nkey: value\n%YAML 1.2\n---\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n=VAL :key\n=VAL :value\n"
}
},
{
"id": "FP8R",
"name": "zero-indented-block-scalar",
"label": "Zero indented block scalar",
"error": false,
"tags": [
"indent",
"scalar",
"folded"
],
"files": {
"in_yaml": "--- >\nline1\nline2\nline3\n",
"in_json": "\"line1 line2 line3\\n\"\n",
"out_yaml": "--- >\n line1 line2 line3\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL >line1 line2 line3\\n\n-DOC\n-STR\n"
}
},
{
"id": "DK3J",
"name": "zero-indented-block-scalar-with-line-that-looks-like-a-comment",
"label": "Zero indented block scalar with line that looks like a comment",
"error": false,
"tags": [
"comment",
"scalar",
"folded"
],
"files": {
"in_yaml": "--- >\nline1\n# no comment\nline3\n",
"in_json": "\"line1 # no comment line3\\n\"\n",
"out_yaml": "--- >\n line1 # no comment line3\n",
"emit_yaml": null,
"lex_token": null,
"test_event": "+STR\n+DOC ---\n=VAL >line1 # no comment line3\\n\n-DOC\n-STR\n"
}
},
{
"id": "6PBE",
"name": "zero-indented-sequences-in-explicit-mapping-keys",
"label": "Zero-indented sequences in explicit mapping keys",
"error": false,
"tags": [
"sequence",
"mapping"
],
"files": {
"in_yaml": "---\n?\n- a\n- b\n:\n- c\n- d\n",
"in_json": null,
"out_yaml": null,
"emit_yaml": "---\n? - a\n - b\n: - c\n - d\n",
"lex_token": null,
"test_event": "+STR\n+DOC ---\n+MAP\n+SEQ\n=VAL :a\n=VAL :b\n-SEQ\n+SEQ\n=VAL :c\n=VAL :d\n-SEQ\n-MAP\n-DOC\n-STR\n"
}
}
]
@flucknugget
Copy link
Author

I searched the web for "yaml test suite json" and only found data-valid.json and data-invalid.json and they don't have labels/names.

So now this exists. It's all the named tests and all data from them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment