Generated with YAML::PP v0.004-32-g2d073be
Valid (204)
Invalid (44)

Valid

YAML::PP::Highlight YAML::PP::Loader | Data::Dump YAML::PP::Loader | JSON::XS YAML::PP::Loader | YAML::PP::Dumper
229Q - Spec Example 2.4. Sequence of Mappings
Tags:
mapping, sequence, spec
View source
-
  name: Mark McGwire
  hr:   65
  avg:  0.278
-
  name: Sammy Sosa
  hr:   63
  avg:  0.288


$doc1 = [
  { avg => 0.278, hr => 65, name => "Mark McGwire" },
  { avg => 0.288, hr => 63, name => "Sammy Sosa" },
]
Doc 1: [
   {
      "avg" : 0.278,
      "hr" : 65,
      "name" : "Mark McGwire"
   },
   {
      "avg" : 0.288,
      "hr" : 63,
      "name" : "Sammy Sosa"
   }
]
- avg: 0.278
  hr: 65
  name: "Mark McGwire"
- avg: 0.288
  hr: 63
  name: "Sammy Sosa"
26DV - Whitespace around colon in mappings
Tags:
alias, mapping, whitespace
View source
"top1" : 
  "key1" : &alias1 scalar1
'top2' : 
  'key2' : &alias2 scalar2
top3: &node3 
  *alias1 : scalar3
top4: 
  *alias2 : scalar4
top5   :    
  scalar5
top6: 
  &anchor6 'key6' : scalar6


$doc1 = {
  top1 => { key1 => "scalar1" },
  top2 => { key2 => "scalar2" },
  top3 => { scalar1 => "scalar3" },
  top4 => { scalar2 => "scalar4" },
  top5 => "scalar5",
  top6 => { key6 => "scalar6" },
}
Doc 1: {
   "top1" : {
      "key1" : "scalar1"
   },
   "top2" : {
      "key2" : "scalar2"
   },
   "top3" : {
      "scalar1" : "scalar3"
   },
   "top4" : {
      "scalar2" : "scalar4"
   },
   "top5" : "scalar5",
   "top6" : {
      "key6" : "scalar6"
   }
}
top1:
  key1: scalar1
top2:
  key2: scalar2
top3:
  scalar1: scalar3
top4:
  scalar2: scalar4
top5: scalar5
top6:
  key6: scalar6
27NA - Spec Example 5.9. Directive Indicator
Tags:
1.3-err, directive, spec
View source
%YAML 1.2
--- text


$doc1 = "text"
Doc 1: "text"
text
2AUY - Tags in Block Sequence
Tags:
sequence, tag
View source
 - !!str a
 - b
 - !!int 42
 - d


$doc1 = ["a", "b", 42, "d"]
Doc 1: [
   "a",
   "b",
   42,
   "d"
]
- a
- b
- 42
- d
2EBW - Allowed characters in keys
Tags:
mapping
View source
a!"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~: safe
?foo: safe question mark
:foo: safe colon
-foo: safe dash
this is#not: a comment


$doc1 = {
  "-foo" => "safe dash",
  ":foo" => "safe colon",
  "?foo" => "safe question mark",
  "a!\"#\$%&'()*+,-./09:;<=>?\@AZ[\\]^_`az{|}~" => "safe",
  "this is#not" => "a comment",
}
Doc 1: {
   "-foo" : "safe dash",
   ":foo" : "safe colon",
   "?foo" : "safe question mark",
   "a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~" : "safe",
   "this is#not" : "a comment"
}
-foo: "safe dash"
":foo": "safe colon"
"?foo": "safe question mark"
"a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~": safe
"this is#not": "a comment"
2JQS - Block Mapping with Missing Keys
Tags:
empty, mapping
View source
: a
: b


$doc1 = { "" => "b" }
Doc 1: {
   "" : "b"
}
"": b
2LFX - Spec Example 6.13. Reserved Directives [1.3]
Tags:
1.3-mod, directive, double, header, spec
View source
%FOO  bar baz # Should be ignored
              # with a warning.
---
"foo"


$doc1 = "foo"
Doc 1: "foo"
foo
2SXE - Anchors With Colon in Name
Tags:
1.3-err, alias, edge
View source
&a: key: &a value
foo:
  *a:


$doc1 = { foo => "key", key => "value" }
Doc 1: {
   "foo" : "key",
   "key" : "value"
}
foo: key
key: value
2XXW - Spec Example 2.25. Unordered Sets
Tags:
mapping, spec
View source
# Sets are represented as a
# Mapping where each key is
# associated with a null value
--- !!set
? Mark McGwire
? Sammy Sosa
? Ken Griff


$doc1 = { "Ken Griff" => undef, "Mark McGwire" => undef, "Sammy Sosa" => undef }
Doc 1: {
   "Ken Griff" : null,
   "Mark McGwire" : null,
   "Sammy Sosa" : null
}
"Ken Griff":
"Mark McGwire":
"Sammy Sosa":
35KP - Tags for Root Objects
Tags:
tag
View source
--- !!map
? a
: b
--- !!seq
- !!str c
--- !!str
d
e


$doc1 = { a => "b" }
$doc2 = ["c"]
$doc3 = "d e"
Doc 1: {
   "a" : "b"
}

Doc 2: [
   "c"
]

Doc 3: "d e"
a: b
---
- c
--- "d e"
3ALJ - Block Sequence in Block Sequence
Tags:
sequence
View source
- - s1_i1
  - s1_i2
- s2


$doc1 = [["s1_i1", "s1_i2"], "s2"]
Doc 1: [
   [
      "s1_i1",
      "s1_i2"
   ],
   "s2"
]
- - "s1_i1"
  - "s1_i2"
- s2
3GZX - Spec Example 7.1. Alias Nodes
Tags:
alias, spec
View source
First occurrence: &anchor Foo
Second occurrence: *anchor
Override anchor: &anchor Bar
Reuse anchor: *anchor


$doc1 = {
  "First occurrence"  => "Foo",
  "Override anchor"   => "Bar",
  "Reuse anchor"      => "Bar",
  "Second occurrence" => "Foo",
}
Doc 1: {
   "First occurrence" : "Foo",
   "Override anchor" : "Bar",
   "Reuse anchor" : "Bar",
   "Second occurrence" : "Foo"
}
"First occurrence": Foo
"Override anchor": Bar
"Reuse anchor": Bar
"Second occurrence": Foo
3MYT - Plain Scalar looking like key, comment, anchor and tag
Tags:
1.3-err, scalar
View source
k:#foo
 &a !t s


$doc1 = "k:#foo &a !t s"
Doc 1: "k:#foo &a !t s"
"k:#foo &a !t s"
4ABK - Spec Example 7.17. Flow Mapping Separate Values
Tags:
flow, mapping, spec
View source
{
unquoted : "separate",
http://foo.com,
omitted value:,
: omitted key,
}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



4CQQ - Spec Example 2.18. Multi-line Flow Scalars
Tags:
scalar, spec
View source
plain:
  This unquoted scalar
  spans many lines.

quoted: "So does this
  quoted scalar.\n"


$doc1 = {
  plain  => "This unquoted scalar spans many lines.",
  quoted => "So does this quoted scalar.\n",
}
Doc 1: {
   "plain" : "This unquoted scalar spans many lines.",
   "quoted" : "So does this quoted scalar.\n"
}
plain: "This unquoted scalar spans many lines."
quoted: "So does this quoted scalar.\n"
4GC6 - Spec Example 7.7. Single Quoted Characters
Tags:
1.3-err, scalar, spec
View source
'here''s to "quotes"'


$doc1 = "here's to \"quotes\""
Doc 1: "here's to \"quotes\""
"here's to \"quotes\""
4Q9F - Folded Block Scalar [1.3]
Tags:
1.3-mod, scalar
View source
--- >
 ab
 cd
 
 ef


 gh


$doc1 = "ab cd\nef\n\ngh\n"
Doc 1: "ab cd\nef\n\ngh\n"
"ab cd\nef\n\ngh\n"
4QFQ - Spec Example 8.2. Block Indentation Indicator [1.3]
Tags:
1.3-mod, folded, libyaml-err, literal, scalar, spec
View source
- |
 detected
- >
 
  
  # detected
- |1
  explicit
- >
 detected


$doc1 = ["detected\n", "\n\n# detected\n", " explicit\n", "detected\n"]
Doc 1: [
   "detected\n",
   "\n\n# detected\n",
   " explicit\n",
   "detected\n"
]
- "detected\n"
- "\n\n# detected\n"
- " explicit\n"
- "detected\n"
4UYU - Colon in Double Quoted String
Tags:
1.3-err, scalar
View source
"foo: bar\": baz"


$doc1 = "foo: bar\": baz"
Doc 1: "foo: bar\": baz"
"foo: bar\": baz"
4V8U - Plain scalar with backslashes
Tags:
scalar
View source
---
plain\value\with\backslashes


$doc1 = "plain\\value\\with\\backslashes"
Doc 1: "plain\\value\\with\\backslashes"
"plain\\value\\with\\backslashes"
4ZYM - Spec Example 6.4. Line Prefixes
Tags:
double, literal, scalar, spec, upto-1.2
View source
plain: text
  lines
quoted: "text
  	lines"
block: |
  text
   	lines


$doc1 = {
  block  => "text\n \tlines\n",
  plain  => "text lines",
  quoted => "text lines",
}
Doc 1: {
   "block" : "text\n \tlines\n",
   "plain" : "text lines",
   "quoted" : "text lines"
}
block: "text\n \tlines\n"
plain: "text lines"
quoted: "text lines"
52DL - Explicit Non-Specific Tag [1.3]
Tags:
1.3-mod, tag
View source
---
! a


$doc1 = "a"
Doc 1: "a"
a
54T7 - Flow Mapping
Tags:
flow, mapping
View source
{foo: you, bar: far}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



565N - Construct Binary
Tags:
jayt
View source
canonical: !!binary "\
 R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\
 OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\
 +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\
 AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs="
generic: !!binary |
 R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5
 OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+
 +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC
 AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=
description:
 The binary value above is a tiny arrow encoded as a gif image.


$doc1 = {
  canonical   => "R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLCAgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=",
  description => "The binary value above is a tiny arrow encoded as a gif image.",
  generic     => "R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\nOTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\n+f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\nAgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=\n",
}
Doc 1: {
   "canonical" : "R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLCAgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=",
   "description" : "The binary value above is a tiny arrow encoded as a gif image.",
   "generic" : "R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\nOTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\n+f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\nAgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=\n"
}
canonical: "R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLCAgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs="
description: "The binary value above is a tiny arrow encoded as a gif image."
generic: "R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\nOTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\n+f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\nAgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=\n"
57H4 - Spec Example 8.22. Block Collection Nodes
Tags:
mapping, sequence, tag
View source
sequence: !!seq
- entry
- !!seq
 - nested
mapping: !!map
 foo: bar


$doc1 = { mapping => { foo => "bar" }, sequence => ["entry", ["nested"]] }
Doc 1: {
   "mapping" : {
      "foo" : "bar"
   },
   "sequence" : [
      "entry",
      [
         "nested"
      ]
   ]
}
mapping:
  foo: bar
sequence:
- entry
- - nested
5BVJ - Spec Example 5.7. Block Scalar Indicators
Tags:
folded, literal, scalar, spec
View source
literal: |
  some
  text
folded: >
  some
  text


$doc1 = { folded => "some text\n", literal => "some\ntext\n" }
Doc 1: {
   "folded" : "some text\n",
   "literal" : "some\ntext\n"
}
folded: "some text\n"
literal: "some\ntext\n"
5C5M - Spec Example 7.15. Flow Mappings
Tags:
flow, mapping, spec
View source
- { one : two , three: four , }
- {five: six,seven : eight}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "- "
  at YAML/PP/Loader.pm line 52.



5GBF - Spec Example 6.5. Empty Lines
Tags:
scalar, spec, upto-1.2
View source
Folding:
  "Empty line
   	
  as a line feed"
Chomping: |
  Clipped empty lines
 



$doc1 = {
  Chomping => "Clipped empty lines\n",
  Folding  => "Empty line\nas a line feed",
}
Doc 1: {
   "Chomping" : "Clipped empty lines\n",
   "Folding" : "Empty line\nas a line feed"
}
Chomping: "Clipped empty lines\n"
Folding: "Empty line\nas a line feed"
5KJE - Spec Example 7.13. Flow Sequence
Tags:
flow, sequence, spec
View source
- [ one, two, ]
- [three ,four]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "- "
  at YAML/PP/Loader.pm line 52.



5NYZ - Spec Example 6.9. Separated Comment
Tags:
comment, spec
View source
key:    # Comment
  value


$doc1 = { key => "value" }
Doc 1: {
   "key" : "value"
}
key: value
5TYM - Spec Example 6.21. Local Tag Prefix
Tags:
directive, spec, tag
View source
%TAG !m! !my-
--- # Bulb here
!m!light fluorescent
...
%TAG !m! !my-
--- # Color here
!m!light green


$doc1 = "fluorescent"
$doc2 = "green"
Doc 1: "fluorescent"

Doc 2: "green"
fluorescent
--- green
5WE3 - Spec Example 8.17. Explicit Block Mapping Entries
Tags:
comment, literal, mapping, spec
View source
? explicit key # Empty value
? |
  block key
: - one # Explicit compact
  - two # block value


$doc1 = { "block key\n" => ["one", "two"], "explicit key" => undef }
Doc 1: {
   "block key\n" : [
      "one",
      "two"
   ],
   "explicit key" : null
}
"block key\n":
- one
- two
"explicit key":
65WH - Single Entry Block Sequence
Tags:
sequence
View source
- foo


$doc1 = ["foo"]
Doc 1: [
   "foo"
]
- foo
6BCT - Spec Example 6.3. Separation Spaces
Tags:
libyaml-err, sequence, spec, upto-1.2, whitespace
View source
- foo:	 bar
- - baz
  -	baz


$doc1 = [{ foo => "bar" }, ["baz", "baz"]]
Doc 1: [
   {
      "foo" : "bar"
   },
   [
      "baz",
      "baz"
   ]
]
- foo: bar
- - baz
  - baz
6CK3 - Spec Example 6.26. Tag Shorthands
Tags:
spec, tag
View source
%TAG !e! tag:example.com,2000:app/
---
- !local foo
- !!str bar
- !e!tag%21 baz


$doc1 = ["foo", "bar", "baz"]
Doc 1: [
   "foo",
   "bar",
   "baz"
]
- foo
- bar
- baz
6FWR - Block Scalar Keep
Tags:
scalar
View source
--- |+
 ab
 
  
...


$doc1 = "ab\n\n \n"
Doc 1: "ab\n\n \n"
"ab\n\n \n"
6H3V - Backslashes in singlequotes
Tags:
scalar, single
View source
'foo: bar\': baz'


$doc1 = { "foo: bar\\" => "baz'" }
Doc 1: {
   "foo: bar\\" : "baz'"
}
"foo: bar\\": "baz'"
6HB6 - Spec Example 6.1. Indentation Spaces
Tags:
indent, spec, upto-1.2
View source
  # Leading comment line spaces are
   # neither content nor indentation.
    
Not indented:
 By one space: |
    By four
      spaces
 Flow style: [    # Leading spaces
   By two,        # in flow style
  Also by two,    # are neither
  	Still by two   # content nor
    ]             # indentation.
Line      : 8
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : " Flow style: "
  at YAML/PP/Loader.pm line 52.



6JQW - Spec Example 2.13. In literals, newlines are preserved
Tags:
comment, literal, scalar, spec
View source
# ASCII Art
--- |
  \//||\/||
  // ||  ||__


$doc1 = "\\//||\\/||\n// ||  ||__\n"
Doc 1: "\\//||\\/||\n// ||  ||__\n"
"\\//||\\/||\n// ||  ||__\n"
6JWB - Tags for Block Objects
Tags:
tag
View source
foo: !!seq
  - !!str a
  - !!map
    key: !!str value


$doc1 = { foo => ["a", { key => "value" }] }
Doc 1: {
   "foo" : [
      "a",
      {
         "key" : "value"
      }
   ]
}
foo:
- a
- key: value
6LVF - Spec Example 6.13. Reserved Directives
Tags:
1.3-err, directive, double, header, spec
View source
%FOO  bar baz # Should be ignored
              # with a warning.
--- "foo"


$doc1 = "foo"
Doc 1: "foo"
foo
6M2F - Aliases in Explicit Block Mapping
Tags:
alias, missing
View source
? &a a
: &b b
: *a


$doc1 = { "" => "a", "a" => "b" }
Doc 1: {
   "" : "a",
   "a" : "b"
}
"": a
a: b
6SLA - Allowed characters in quoted mapping key
Tags:
double, mapping, single
View source
"foo\nbar:baz\tx \\$%^&*()x": 23
'x\ny:z\tx $%^&*()x': 24


$doc1 = { "foo\nbar:baz\tx \\\$%^&*()x" => 23, "x\\ny:z\\tx \$%^&*()x" => 24 }
Doc 1: {
   "foo\nbar:baz\tx \\$%^&*()x" : 23,
   "x\\ny:z\\tx $%^&*()x" : 24
}
"foo\nbar:baz\tx \\$%^&*()x": 23
"x\\ny:z\\tx $%^&*()x": 24
6VJK - Spec Example 2.15. Folded newlines are preserved for "more indented" and blank lines
Tags:
1.3-err, folded, scalar, spec
View source
>
 Sammy Sosa completed another
 fine season with great stats.

   63 Home Runs
   0.288 Batting Average

 What a year!


$doc1 = "Sammy Sosa completed another fine season with great stats.\n\n  63 Home Runs\n  0.288 Batting Average\n\nWhat a year!\n"
Doc 1: "Sammy Sosa completed another fine season with great stats.\n\n  63 Home Runs\n  0.288 Batting Average\n\nWhat a year!\n"
"Sammy Sosa completed another fine season with great stats.\n\n  63 Home Runs\n  0.288 Batting Average\n\nWhat a year!\n"
6WLZ - Spec Example 6.18. Primary Tag Handle [1.3]
Tags:
1.3-mod, directive, spec, tag
View source
# Private
---
!foo "bar"
...
# Global
%TAG ! tag:example.com,2000:app/
---
!foo "bar"


$doc1 = "bar"
$doc2 = "bar"
Doc 1: "bar"

Doc 2: "bar"
bar
--- bar
6WPF - Spec Example 6.8. Flow Folding [1.3]
Tags:
1.3-mod, scalar, spec, whitespace
View source
---
"
  foo 
 
    bar

  baz
"


$doc1 = " foo\nbar\nbaz "
Doc 1: " foo\nbar\nbaz "
" foo\nbar\nbaz "
6ZKB - Spec Example 9.6. Stream
Tags:
1.3-err, header, spec
View source
Document
---
# Empty
...
%YAML 1.2
---
matches %: 20


$doc1 = "Document"
$doc2 = undef
$doc3 = { "matches %" => 20 }
Doc 1: "Document"

Doc 2: null

Doc 3: {
   "matches %" : 20
}
Document
---
---
"matches %": 20
735Y - Spec Example 8.20. Block Node Types
Tags:
folded, spec
View source
-
  "flow in block"
- >
 Block scalar
- !!map # Block collection
  foo : bar


$doc1 = ["flow in block", "Block scalar\n", { foo => "bar" }]
Doc 1: [
   "flow in block",
   "Block scalar\n",
   {
      "foo" : "bar"
   }
]
- "flow in block"
- "Block scalar\n"
- foo: bar
74H7 - Tags in Implicit Mapping
Tags:
mapping, tag
View source
!!str a: b
c: !!int 42
e: !!str f
g: h
!!int 23: !!bool false


$doc1 = {
  23 => bless(do{\(my $o = 0)}, "JSON::PP::Boolean"),
  a  => "b",
  c  => 42,
  e  => "f",
  g  => "h",
}
Doc 1: {
   "23" : false,
   "a" : "b",
   "c" : 42,
   "e" : "f",
   "g" : "h"
}
23: false
a: b
c: 42
e: f
g: h
753E - Block Scalar Strip [1.3]
Tags:
1.3-mod, scalar
View source
--- |-
 ab
 
 
...


$doc1 = "ab"
Doc 1: "ab"
ab
77H8 - Spec Example 2.23. Various Explicit Tags
Tags:
spec, tag
View source
---
not-date: !!str 2002-04-28

picture: !!binary |
 R0lGODlhDAAMAIQAAP//9/X
 17unp5WZmZgAAAOfn515eXv
 Pz7Y6OjuDg4J+fn5OTk6enp
 56enmleECcgggoBADs=

application specific tag: !something |
 The semantics of the tag
 above may be different for
 different documents.


$doc1 = {
  "application specific tag" => "The semantics of the tag\nabove may be different for\ndifferent documents.\n",
  "not-date" => "2002-04-28",
  "picture" => "R0lGODlhDAAMAIQAAP//9/X\n17unp5WZmZgAAAOfn515eXv\nPz7Y6OjuDg4J+fn5OTk6enp\n56enmleECcgggoBADs=\n",
}
Doc 1: {
   "application specific tag" : "The semantics of the tag\nabove may be different for\ndifferent documents.\n",
   "not-date" : "2002-04-28",
   "picture" : "R0lGODlhDAAMAIQAAP//9/X\n17unp5WZmZgAAAOfn515eXv\nPz7Y6OjuDg4J+fn5OTk6enp\n56enmleECcgggoBADs=\n"
}
"application specific tag": "The semantics of the tag\nabove may be different for\ndifferent documents.\n"
not-date: 2002-04-28
picture: "R0lGODlhDAAMAIQAAP//9/X\n17unp5WZmZgAAAOfn515eXv\nPz7Y6OjuDg4J+fn5OTk6enp\n56enmleECcgggoBADs=\n"
7A4E - Spec Example 7.6. Double Quoted Lines
Tags:
scalar, spec, upto-1.2
View source
" 1st non-empty

 2nd non-empty 
	3rd non-empty "


$doc1 = " 1st non-empty\n2nd non-empty 3rd non-empty "
Doc 1: " 1st non-empty\n2nd non-empty 3rd non-empty "
" 1st non-empty\n2nd non-empty 3rd non-empty "
7BMT - Node and Mapping Key Anchors [1.3]
Tags:
1.3-mod, anchor, comment
View source
---
top1: &node1
  &k1 key1: one
top2: &node2 # comment
  key2: two
top3:
  &k3 key3: three
top4: &node4
  &k4 key4: four
top5: &node5
  key5: five
top6: &val6
  six
top7:
  &val7 seven


$doc1 = {
  top1 => { key1 => "one" },
  top2 => { key2 => "two" },
  top3 => { key3 => "three" },
  top4 => { key4 => "four" },
  top5 => { key5 => "five" },
  top6 => "six",
  top7 => "seven",
}
Doc 1: {
   "top1" : {
      "key1" : "one"
   },
   "top2" : {
      "key2" : "two"
   },
   "top3" : {
      "key3" : "three"
   },
   "top4" : {
      "key4" : "four"
   },
   "top5" : {
      "key5" : "five"
   },
   "top6" : "six",
   "top7" : "seven"
}
top1:
  key1: one
top2:
  key2: two
top3:
  key3: three
top4:
  key4: four
top5:
  key5: five
top6: six
top7: seven
7BUB - Spec Example 2.10. Node for “Sammy Sosa” appears twice in this document
Tags:
alias, spec
View source
---
hr:
  - Mark McGwire
  # Following node labeled SS
  - &SS Sammy Sosa
rbi:
  - *SS # Subsequent occurrence
  - Ken Griffey


$doc1 = {
  hr  => ["Mark McGwire", "Sammy Sosa"],
  rbi => ["Sammy Sosa", "Ken Griffey"],
}
Doc 1: {
   "hr" : [
      "Mark McGwire",
      "Sammy Sosa"
   ],
   "rbi" : [
      "Sammy Sosa",
      "Ken Griffey"
   ]
}
hr:
- "Mark McGwire"
- "Sammy Sosa"
rbi:
- "Sammy Sosa"
- "Ken Griffey"
7FWL - Spec Example 6.24. Verbatim Tags
Tags:
spec, tag
View source
!<tag:yaml.org,2002:str> foo :
  !<!bar> baz


$doc1 = { foo => "baz" }
Doc 1: {
   "foo" : "baz"
}
foo: baz
7T8X - Spec Example 8.10. Folded Lines - 8.13. Final Empty Lines
Tags:
1.3-err, comment, folded, scalar, spec
View source
>

 folded
 line

 next
 line
   * bullet

   * list
   * lines

 last
 line

# Comment


$doc1 = "\nfolded line\nnext line\n  * bullet\n\n  * list\n  * lines\n\nlast line\n"
Doc 1: "\nfolded line\nnext line\n  * bullet\n\n  * list\n  * lines\n\nlast line\n"
"\nfolded line\nnext line\n  * bullet\n\n  * list\n  * lines\n\nlast line\n"
7W2P - Block Mapping with Missing Values
Tags:
mapping
View source
? a
? b
c:


$doc1 = { a => undef, b => undef, c => undef }
Doc 1: {
   "a" : null,
   "b" : null,
   "c" : null
}
a:
b:
c:
7Z25 - Bare document after document end marker
Tags:
footer
View source
---
scalar1
...
key: value


$doc1 = "scalar1"
$doc2 = { key => "value" }
Doc 1: "scalar1"

Doc 2: {
   "key" : "value"
}
scalar1
---
key: value
82AN - Three dashes and content without space
Tags:
1.3-err, scalar
View source
---word1
word2


$doc1 = "---word1 word2"
Doc 1: "---word1 word2"
"---word1 word2"
87E4 - Spec Example 7.8. Single Quoted Implicit Keys
Tags:
flow, mapping, sequence, spec
View source
'implicit block key' : [
  'implicit flow key' : value,
 ]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "'implicit block key' : "
  at YAML/PP/Loader.pm line 52.



8CWC - Plain mapping key ending with colon
Tags:
mapping, scalar
View source
---
key ends with two colons::: value
Line      : 2
Message   : Invalid plain scalar
Where     : YAML/PP/Lexer.pm line 623
YAML      : "key ends with two colons"
  at YAML/PP/Loader.pm line 52.



8G76 - Spec Example 6.10. Comment Lines
Tags:
comment, empty, scalar, spec
View source
  # Comment
   







8MK2 - Explicit Non-Specific Tag
Tags:
1.3-err, tag
View source
! a


$doc1 = "a"
Doc 1: "a"
a
8QBE - Block Sequence in Block Mapping
Tags:
mapping, sequence
View source
key:
 - item1
 - item2


$doc1 = { key => ["item1", "item2"] }
Doc 1: {
   "key" : [
      "item1",
      "item2"
   ]
}
key:
- item1
- item2
8UDB - Spec Example 7.14. Flow Sequence Entries
Tags:
flow, sequence, spec
View source
[
"double
 quoted", 'single
           quoted',
plain
 text, [ nested ],
single: pair,
]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



93JH - Block Mappings in Block Sequence
Tags:
mapping, sequence
View source
 - key: value
   key2: value2
 -
   key3: value3


$doc1 = [{ key => "value", key2 => "value2" }, { key3 => "value3" }]
Doc 1: [
   {
      "key" : "value",
      "key2" : "value2"
   },
   {
      "key3" : "value3"
   }
]
- key: value
  key2: value2
- key3: value3
93WF - Spec Example 6.6. Line Folding [1.3]
Tags:
1.3-mod, scalar, spec, whitespace
View source
--- >-
  trimmed
  
 

  as
  space


$doc1 = "trimmed\n\n\nas space"
Doc 1: "trimmed\n\n\nas space"
"trimmed\n\n\nas space"
96L6 - Spec Example 2.14. In the folded scalars, newlines become spaces
Tags:
folded, scalar, spec
View source
--- >
  Mark McGwire's
  year was crippled
  by a knee injury.


$doc1 = "Mark McGwire's year was crippled by a knee injury.\n"
Doc 1: "Mark McGwire's year was crippled by a knee injury.\n"
"Mark McGwire's year was crippled by a knee injury.\n"
98YD - Spec Example 5.5. Comment Indicator
Tags:
comment, empty, spec
View source
# Comment only.





9DXL - Spec Example 9.6. Stream [1.3]
Tags:
1.3-mod, header, spec
View source
Mapping: Document
---
# Empty
...
%YAML 1.2
---
matches %: 20


$doc1 = { Mapping => "Document" }
$doc2 = undef
$doc3 = { "matches %" => 20 }
Doc 1: {
   "Mapping" : "Document"
}

Doc 2: null

Doc 3: {
   "matches %" : 20
}
Mapping: Document
---
---
"matches %": 20
9FMG - Multi-level Mapping Indent
Tags:
indent, mapping
View source
a:
  b:
    c: d
  e:
    f: g
h: i


$doc1 = { a => { b => { c => "d" }, e => { f => "g" } }, h => "i" }
Doc 1: {
   "a" : {
      "b" : {
         "c" : "d"
      },
      "e" : {
         "f" : "g"
      }
   },
   "h" : "i"
}
a:
  b:
    c: d
  e:
    f: g
h: i
9J7A - Simple Mapping Indent
Tags:
indent, mapping, simple
View source
foo:
  bar: baz


$doc1 = { foo => { bar => "baz" } }
Doc 1: {
   "foo" : {
      "bar" : "baz"
   }
}
foo:
  bar: baz
9KAX - Various combinations of tags and anchors
Tags:
1.3-err, anchor, mapping
View source
---
&a1
!t1
scalar1
---
!t2
&a2
scalar2
---
&a3
!t3 scalar3
---
&a4 !t4
&a5 !t5 key5: value4
---
a6: 1
&anchor6 b6: 2
---
!t7
&a8 !t8 key8: value7
---
!t9
!t10 &a10 key10: value9
---
!t11 &a11
value11


$doc1 = "scalar1"
$doc2 = "scalar2"
$doc3 = "scalar3"
$doc4 = { key5 => "value4" }
$doc5 = { a6 => 1, b6 => 2 }
$doc6 = { key8 => "value7" }
$doc7 = { key10 => "value9" }
$doc8 = "value11"
Doc 1: "scalar1"

Doc 2: "scalar2"

Doc 3: "scalar3"

Doc 4: {
   "key5" : "value4"
}

Doc 5: {
   "a6" : 1,
   "b6" : 2
}

Doc 6: {
   "key8" : "value7"
}

Doc 7: {
   "key10" : "value9"
}

Doc 8: "value11"
scalar1
--- scalar2
--- scalar3
---
key5: value4
---
a6: 1
b6: 2
---
key8: value7
---
key10: value9
--- value11
9MMW - Spec Example 7.21. Single Pair Implicit Entries [1.3
Tags:
1.3-mod, flow, mapping, spec
View source
- [ YAML : separate ]
- [ : empty key entry ]
- [ "JSON like":adjacent ]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "- "
  at YAML/PP/Loader.pm line 52.



9SHH - Spec Example 5.8. Quoted Scalar Indicators
Tags:
scalar, spec
View source
single: 'text'
double: "text"


$doc1 = { double => "text", single => "text" }
Doc 1: {
   "double" : "text",
   "single" : "text"
}
double: text
single: text
9TFX - Spec Example 7.6. Double Quoted Lines [1.3]
Tags:
1.3-mod, scalar, spec
View source
---
" 1st non-empty

 2nd non-empty 
 3rd non-empty "


$doc1 = " 1st non-empty\n2nd non-empty 3rd non-empty "
Doc 1: " 1st non-empty\n2nd non-empty 3rd non-empty "
" 1st non-empty\n2nd non-empty 3rd non-empty "
9U5K - Spec Example 2.12. Compact Nested Mapping
Tags:
mapping, sequence, spec
View source
---
# Products purchased
- item    : Super Hoop
  quantity: 1
- item    : Basketball
  quantity: 4
- item    : Big Shoes
  quantity: 1


$doc1 = [
  { item => "Super Hoop", quantity => 1 },
  { item => "Basketball", quantity => 4 },
  { item => "Big Shoes", quantity => 1 },
]
Doc 1: [
   {
      "item" : "Super Hoop",
      "quantity" : 1
   },
   {
      "item" : "Basketball",
      "quantity" : 4
   },
   {
      "item" : "Big Shoes",
      "quantity" : 1
   }
]
- item: "Super Hoop"
  quantity: 1
- item: Basketball
  quantity: 4
- item: "Big Shoes"
  quantity: 1
9WXW - Spec Example 6.18. Primary Tag Handle
Tags:
1.3-err, directive, spec, tag
View source
# Private
!foo "bar"
...
# Global
%TAG ! tag:example.com,2000:app/
---
!foo "bar"


$doc1 = "bar"
$doc2 = "bar"
Doc 1: "bar"

Doc 2: "bar"
bar
--- bar
9YRD - Multiline Scalar at Top Level
Tags:
1.3-err, scalar
View source
a
b  
  c
d

e


$doc1 = "a b c d\ne"
Doc 1: "a b c d\ne"
"a b c d\ne"
A2M4 - Spec Example 6.2. Indentation Indicators
Tags:
indent, libyaml-err, sequence, spec, upto-1.2, whitespace
View source
? a
: -	b
  -  -	c
     - d


$doc1 = { a => ["b", ["c", "d"]] }
Doc 1: {
   "a" : [
      "b",
      [
         "c",
         "d"
      ]
   ]
}
a:
- b
- - c
  - d
A6F9 - Spec Example 8.4. Chomping Final Line Break
Tags:
literal, scalar, spec
View source
strip: |-
  text
clip: |
  text
keep: |+
  text


$doc1 = { clip => "text\n", keep => "text\n", strip => "text" }
Doc 1: {
   "clip" : "text\n",
   "keep" : "text\n",
   "strip" : "text"
}
clip: "text\n"
keep: "text\n"
strip: text
A984 - Multiline Scalar in Mapping
Tags:
scalar
View source
a: b
 c
d:
 e
  f


$doc1 = { a => "b c", d => "e f" }
Doc 1: {
   "a" : "b c",
   "d" : "e f"
}
a: "b c"
d: "e f"
AB8U - Sequence entry that looks like two with wrong indentation
Tags:
sequence
View source
- single multiline
 - sequence entry


$doc1 = ["single multiline - sequence entry"]
Doc 1: [
   "single multiline - sequence entry"
]
- "single multiline - sequence entry"
AVM7 - Empty Stream
Tags:
edge
View source






AZ63 - Sequence With Same Indentation as Parent Mapping
Tags:
mapping, sequence
View source
1:
- 2
- 3
4: 5


$doc1 = { 1 => [2, 3], 4 => 5 }
Doc 1: {
   "1" : [
      2,
      3
   ],
   "4" : 5
}
1:
- 2
- 3
4: 5
AZW3 - Lookahead test cases
Tags:
edge, mapping
View source
- bla"keks: foo
- bla]keks: foo


$doc1 = [{ "bla\"keks" => "foo" }, { "bla]keks" => "foo" }]
Doc 1: [
   {
      "bla\"keks" : "foo"
   },
   {
      "bla]keks" : "foo"
   }
]
- "bla\"keks": foo
- "bla]keks": foo
B3HG - Spec Example 8.9. Folded Scalar [1.3]
Tags:
1.3-mod, folded, scalar, spec
View source
--- >
 folded
 text




$doc1 = "folded text\n"
Doc 1: "folded text\n"
"folded text\n"
BEC7 - Spec Example 6.14. “YAML” directive
Tags:
directive, spec
View source
%YAML 1.3 # Attempt parsing
          # with a warning
---
"foo"


$doc1 = "foo"
Doc 1: "foo"
foo
BU8L - Node Anchor and Tag on Seperate Lines
Tags:
1.3-err, anchor, indent
View source
key: &anchor
 !tag
  a: b


$doc1 = { key => { a => "b" } }
Doc 1: {
   "key" : {
      "a" : "b"
   }
}
key:
  a: b
C2DT - Spec Example 7.18. Flow Mapping Adjacent Values
Tags:
flow, mapping, spec
View source
{
"adjacent":value,
"readable": value,
"empty":
}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



C4HZ - Spec Example 2.24. Global Tags
Tags:
alias, directive, spec, tag
View source
%TAG ! tag:clarkevans.com,2002:
--- !shape
  # Use the ! handle for presenting
  # tag:clarkevans.com,2002:circle
- !circle
  center: &ORIGIN {x: 73, y: 129}
  radius: 7
- !line
  start: *ORIGIN
  finish: { x: 89, y: 102 }
- !label
  start: *ORIGIN
  color: 0xFFEEBB
  text: Pretty vector drawing.
Line      : 6
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "  center: &ORIGIN "
  at YAML/PP/Loader.pm line 52.



CC74 - Spec Example 6.20. Tag Handles
Tags:
directive, spec, tag
View source
%TAG !e! tag:example.com,2000:app/
---
!e!foo "bar"


$doc1 = "bar"
Doc 1: "bar"
bar
CT4Q - Spec Example 7.20. Single Pair Explicit Entry
Tags:
flow, mapping, spec
View source
[
? foo
 bar : baz
]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



CUP7 - Spec Example 5.6. Node Property Indicators
Tags:
alias, spec, tag
View source
anchored: !local &anchor value
alias: *anchor


$doc1 = { alias => "value", anchored => "value" }
Doc 1: {
   "alias" : "value",
   "anchored" : "value"
}
alias: value
anchored: value
D83L - Block scalar indicator order
Tags:
literal
View source
- |2-
  explicit indent and chomp
- |-2
  chomp and explicit indent


$doc1 = ["explicit indent and chomp", "chomp and explicit indent"]
Doc 1: [
   "explicit indent and chomp",
   "chomp and explicit indent"
]
- "explicit indent and chomp"
- "chomp and explicit indent"
D88J - Flow Sequence in Block Mapping
Tags:
flow, mapping, sequence
View source
a: [b, c]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "a: "
  at YAML/PP/Loader.pm line 52.



D9TU - Single Pair Block Mapping
Tags:
mapping, simple
View source
foo: bar


$doc1 = { foo => "bar" }
Doc 1: {
   "foo" : "bar"
}
foo: bar
DBG4 - Spec Example 7.10. Plain Characters
Tags:
flow, scalar, sequence, spec
View source
# Outside flow collection:
- ::vector
- ": - ()"
- Up, up, and away!
- -123
- http://example.com/foo#bar
# Inside flow collection:
- [ ::vector,
  ": - ()",
  "Up, up and away!",
  -123,
  http://example.com/foo#bar ]
Line      : 8
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "- "
  at YAML/PP/Loader.pm line 52.



DFF7 - Spec Example 7.16. Flow Mapping Entries
Tags:
flow, mapping, spec
View source
{
? explicit: entry,
implicit: entry,
?
}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



DHP8 - Flow Sequence
Tags:
flow, sequence
View source
[foo, bar, 42]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



DK3J - Zero indented block scalar with line that looks like a comment
Tags:
comment, folded, scalar
View source
--- >
line1
# no comment
line3


$doc1 = "line1 # no comment line3\n"
Doc 1: "line1 # no comment line3\n"
"line1 # no comment line3\n"
DWX9 - Spec Example 8.8. Literal Content
Tags:
1.3-err, comment, literal, scalar, spec
View source
|
 
  
  literal
   
  
  text

 # Comment


$doc1 = "\n\nliteral\n \n\ntext\n"
Doc 1: "\n\nliteral\n \n\ntext\n"
"\n\nliteral\n \n\ntext\n"
E76Z - Aliases in Implicit Block Mapping
Tags:
alias, mapping
View source
&a a: &b b
*a : *b


$doc1 = { a => "b" }
Doc 1: {
   "a" : "b"
}
a: b
EHF6 - Tags for Flow Objects
Tags:
flow, tag
View source
!!map {
  k: !!seq
  [ a, !!str b]
}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "!!map "
  at YAML/PP/Loader.pm line 52.



EX5H - Multiline Scalar at Top Level [1.3]
Tags:
1.3-mod, scalar
View source
---
a
b  
  c
d

e


$doc1 = "a b c d\ne"
Doc 1: "a b c d\ne"
"a b c d\ne"
EXG3 - Three dashes and content without space [1.3]
Tags:
1.3-mod, scalar
View source
---
---word1
word2


$doc1 = "---word1 word2"
Doc 1: "---word1 word2"
"---word1 word2"
F2C7 - Anchors and Tags
Tags:
anchor, tag
View source
 - &a !!str a
 - !!int 2
 - !!int &c 4
 - &d d


$doc1 = ["a", 2, 4, "d"]
Doc 1: [
   "a",
   2,
   4,
   "d"
]
- a
- 2
- 4
- d
F8F9 - Spec Example 8.5. Chomping Trailing Lines
Tags:
comment, literal, scalar, spec
View source
 # Strip
  # Comments:
strip: |-
  # text
  
 # Clip
  # comments:

clip: |
  # text
 
 # Keep
  # comments:

keep: |+
  # text

 # Trail
  # comments.


$doc1 = { clip => "# text\n", keep => "# text\n\n", strip => "# text" }
Doc 1: {
   "clip" : "# text\n",
   "keep" : "# text\n\n",
   "strip" : "# text"
}
clip: "# text\n"
keep: "# text\n\n"
strip: "# text"
FBC9 - Allowed characters in plain scalars
Tags:
scalar
View source
safe: a!"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
     !"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
safe question mark: ?foo
safe colon: :foo
safe dash: -foo


$doc1 = {
  "safe" => "a!\"#\$%&'()*+,-./09:;<=>?\@AZ[\\]^_`az{|}~ !\"#\$%&'()*+,-./09:;<=>?\@AZ[\\]^_`az{|}~",
  "safe colon" => ":foo",
  "safe dash" => "-foo",
  "safe question mark" => "?foo",
}
Doc 1: {
   "safe" : "a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~",
   "safe colon" : ":foo",
   "safe dash" : "-foo",
   "safe question mark" : "?foo"
}
safe: "a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~"
"safe colon": ":foo"
"safe dash": -foo
"safe question mark": "?foo"
FH7J - Tags on Empty Scalars
Tags:
scalar, tag
View source
- !!str
-
  !!null : a
  b: !!str
- !!str : !!null


$doc1 = [undef, { "" => "a", "b" => undef }, { "" => undef }]
Doc 1: [
   null,
   {
      "" : "a",
      "b" : null
   },
   {
      "" : null
   }
]
-
- "": a
  b:
- "":
FP8R - Zero indented block scalar
Tags:
folded, indent, scalar
View source
--- >
line1
line2
line3


$doc1 = "line1 line2 line3\n"
Doc 1: "line1 line2 line3\n"
"line1 line2 line3\n"
FQ7F - Spec Example 2.1. Sequence of Scalars
Tags:
sequence, spec
View source
- Mark McGwire
- Sammy Sosa
- Ken Griffey


$doc1 = ["Mark McGwire", "Sammy Sosa", "Ken Griffey"]
Doc 1: [
   "Mark McGwire",
   "Sammy Sosa",
   "Ken Griffey"
]
- "Mark McGwire"
- "Sammy Sosa"
- "Ken Griffey"
FRK4 - Spec Example 7.3. Completely Empty Flow Nodes
Tags:
flow, scalar, spec
View source
{
  ? foo :,
  : bar,
}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



FUP4 - Flow Sequence in Flow Sequence
Tags:
flow, sequence
View source
[a, [b, c]]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



G4RS - Spec Example 2.17. Quoted Scalars
Tags:
scalar, spec
View source
unicode: "Sosa did fine.\u263A"
control: "\b1998\t1999\t2000\n"
hex esc: "\x0d\x0a is \r\n"

single: '"Howdy!" he cried.'
quoted: ' # Not a ''comment''.'
tie-fighter: '|\-*-/|'


$doc1 = {
  "control"     => "\b1998\t1999\t2000\n",
  "hex esc"     => "\r\n is \r\n",
  "quoted"      => " # Not a 'comment'.",
  "single"      => "\"Howdy!\" he cried.",
  "tie-fighter" => "|\\-*-/|",
  "unicode"     => "Sosa did fine.\x{263A}",
}
Doc 1: {
   "control" : "\b1998\t1999\t2000\n",
   "hex esc" : "\r\n is \r\n",
   "quoted" : " # Not a 'comment'.",
   "single" : "\"Howdy!\" he cried.",
   "tie-fighter" : "|\\-*-/|",
   "unicode" : "Sosa did fine.\u263a"
}
control: "\b1998\t1999\t2000\n"
"hex esc": "\r\n is \r\n"
quoted: " # Not a 'comment'."
single: "\"Howdy!\" he cried."
tie-fighter: "|\\-*-/|"
unicode: "Sosa did fine.☺"
G992 - Spec Example 8.9. Folded Scalar
Tags:
1.3-err, folded, scalar, spec
View source
>
 folded
 text




$doc1 = "folded text\n"
Doc 1: "folded text\n"
"folded text\n"
GH63 - Mixed Block Mapping (explicit to implicit)
Tags:
mapping
View source
? a
: 13
1.5: d


$doc1 = { "1.5" => "d", "a" => 13 }
Doc 1: {
   "1.5" : "d",
   "a" : 13
}
1.5: d
a: 13
H2RW - Blank lines
Tags:
comment, scalar
View source
foo: 1

bar: 2
    
text: |
  a
    
  b

  c
 
  d


$doc1 = { bar => 2, foo => 1, text => "a\n  \nb\n\nc\n\nd\n" }
Doc 1: {
   "bar" : 2,
   "foo" : 1,
   "text" : "a\n  \nb\n\nc\n\nd\n"
}
bar: 2
foo: 1
text: "a\n  \nb\n\nc\n\nd\n"
H3Z8 - Literal unicode
Tags:
mapping
View source
---
wanted: love ♥ and peace ☮


$doc1 = { wanted => "love \x{2665} and peace \x{262E}" }
Doc 1: {
   "wanted" : "love \u2665 and peace \u262e"
}
wanted: "love ♥ and peace ☮"
HMK4 - Spec Example 2.16. Indentation determines scope
Tags:
folded, literal, spec
View source
name: Mark McGwire
accomplishment: >
  Mark set a major league
  home run record in 1998.
stats: |
  65 Home Runs
  0.278 Batting Average


$doc1 = {
  accomplishment => "Mark set a major league home run record in 1998.\n",
  name => "Mark McGwire",
  stats => "65 Home Runs\n0.278 Batting Average\n",
}
Doc 1: {
   "accomplishment" : "Mark set a major league home run record in 1998.\n",
   "name" : "Mark McGwire",
   "stats" : "65 Home Runs\n0.278 Batting Average\n"
}
accomplishment: "Mark set a major league home run record in 1998.\n"
name: "Mark McGwire"
stats: "65 Home Runs\n0.278 Batting Average\n"
HMQ5 - Spec Example 6.23. Node Properties
Tags:
alias, spec, tag
View source
!!str &a1 "foo":
  !!str bar
&a2 baz : *a1


$doc1 = { baz => "foo", foo => "bar" }
Doc 1: {
   "baz" : "foo",
   "foo" : "bar"
}
baz: foo
foo: bar
HS5T - Spec Example 7.12. Plain Lines
Tags:
scalar, spec, upto-1.2
View source
1st non-empty

 2nd non-empty 
	3rd non-empty


$doc1 = "1st non-empty\n2nd non-empty 3rd non-empty"
Doc 1: "1st non-empty\n2nd non-empty 3rd non-empty"
"1st non-empty\n2nd non-empty 3rd non-empty"
J3BT - Spec Example 5.12. Tabs and Spaces
Tags:
spec, upto-1.2, whitespace
View source
# Tabs and spaces
quoted: "Quoted 	"
block:	|
  void main() {
  	printf("Hello, world!\n");
  }


$doc1 = {
  block  => "void main() {\n\tprintf(\"Hello, world!\\n\");\n}\n",
  quoted => "Quoted \t",
}
Doc 1: {
   "block" : "void main() {\n\tprintf(\"Hello, world!\\n\");\n}\n",
   "quoted" : "Quoted \t"
}
block: "void main() {\n\tprintf(\"Hello, world!\\n\");\n}\n"
quoted: "Quoted \t"
J5UC - Multiple Pair Block Mapping
Tags:
mapping
View source
foo: blue
bar: arrr
baz: jazz


$doc1 = { bar => "arrr", baz => "jazz", foo => "blue" }
Doc 1: {
   "bar" : "arrr",
   "baz" : "jazz",
   "foo" : "blue"
}
bar: arrr
baz: jazz
foo: blue
J7PZ - Spec Example 2.26. Ordered Mappings
Tags:
mapping, spec
View source
# Ordered maps are represented as
# A sequence of mappings, with
# each mapping having one key
--- !!omap
- Mark McGwire: 65
- Sammy Sosa: 63
- Ken Griffy: 58


$doc1 = [
  { "Mark McGwire" => 65 },
  { "Sammy Sosa" => 63 },
  { "Ken Griffy" => 58 },
]
Doc 1: [
   {
      "Mark McGwire" : 65
   },
   {
      "Sammy Sosa" : 63
   },
   {
      "Ken Griffy" : 58
   }
]
- "Mark McGwire": 65
- "Sammy Sosa": 63
- "Ken Griffy": 58
J7VC - Empty Lines Between Mapping Elements
Tags:
mapping, whitespace
View source
1: 2


3: 4


$doc1 = { 1 => 2, 3 => 4 }
Doc 1: {
   "1" : 2,
   "3" : 4
}
1: 2
3: 4
J9HZ - Spec Example 2.9. Single Document with Two Comments
Tags:
comment, spec
View source
---
hr: # 1998 hr ranking
  - Mark McGwire
  - Sammy Sosa
rbi:
  # 1998 rbi ranking
  - Sammy Sosa
  - Ken Griffey


$doc1 = {
  hr  => ["Mark McGwire", "Sammy Sosa"],
  rbi => ["Sammy Sosa", "Ken Griffey"],
}
Doc 1: {
   "hr" : [
      "Mark McGwire",
      "Sammy Sosa"
   ],
   "rbi" : [
      "Sammy Sosa",
      "Ken Griffey"
   ]
}
hr:
- "Mark McGwire"
- "Sammy Sosa"
rbi:
- "Sammy Sosa"
- "Ken Griffey"
JDH8 - Plain Scalar looking like key, comment, anchor and tag [1.3]
Tags:
1.3-mod, scalar
View source
---
k:#foo
 &a !t s


$doc1 = "k:#foo &a !t s"
Doc 1: "k:#foo &a !t s"
"k:#foo &a !t s"
JHB9 - Spec Example 2.7. Two Documents in a Stream
Tags:
header, spec
View source
# Ranking of 1998 home runs
---
- Mark McGwire
- Sammy Sosa
- Ken Griffey

# Team ranking
---
- Chicago Cubs
- St Louis Cardinals


$doc1 = ["Mark McGwire", "Sammy Sosa", "Ken Griffey"]
$doc2 = ["Chicago Cubs", "St Louis Cardinals"]
Doc 1: [
   "Mark McGwire",
   "Sammy Sosa",
   "Ken Griffey"
]

Doc 2: [
   "Chicago Cubs",
   "St Louis Cardinals"
]
- "Mark McGwire"
- "Sammy Sosa"
- "Ken Griffey"
---
- "Chicago Cubs"
- "St Louis Cardinals"
JQ4R - Spec Example 8.14. Block Sequence
Tags:
sequence, spec
View source
block sequence:
  - one
  - two : three


$doc1 = { "block sequence" => ["one", { two => "three" }] }
Doc 1: {
   "block sequence" : [
      "one",
      {
         "two" : "three"
      }
   ]
}
"block sequence":
- one
- two: three
JS2J - Spec Example 6.29. Node Anchors
Tags:
alias, spec
View source
First occurrence: &anchor Value
Second occurrence: *anchor


$doc1 = { "First occurrence" => "Value", "Second occurrence" => "Value" }
Doc 1: {
   "First occurrence" : "Value",
   "Second occurrence" : "Value"
}
"First occurrence": Value
"Second occurrence": Value
JTV5 - Block Mapping with Multiline Scalars
Tags:
mapping, scalar
View source
? a
  true
: null
  d
? e
  42


$doc1 = { "a true" => "null d", "e 42" => undef }
Doc 1: {
   "a true" : "null d",
   "e 42" : null
}
"a true": "null d"
"e 42":
K4SU - Multiple Entry Block Sequence
Tags:
sequence
View source
- foo
- bar
- 42


$doc1 = ["foo", "bar", 42]
Doc 1: [
   "foo",
   "bar",
   42
]
- foo
- bar
- 42
K527 - Spec Example 6.6. Line Folding
Tags:
1.3-err, scalar, spec, whitespace
View source
>-
  trimmed
  
 

  as
  space


$doc1 = "trimmed\n\n\nas space"
Doc 1: "trimmed\n\n\nas space"
"trimmed\n\n\nas space"
K858 - Spec Example 8.6. Empty Scalar Chomping
Tags:
folded, literal, spec, whitespace
View source
strip: >-

clip: >

keep: |+



$doc1 = { clip => "", keep => "\n", strip => "" }
Doc 1: {
   "clip" : "",
   "keep" : "\n",
   "strip" : ""
}
clip: ""
keep: "\n"
strip: ""
KMK3 - Block Submapping
Tags:
mapping
View source
foo:
  bar: 1
baz: 2


$doc1 = { baz => 2, foo => { bar => 1 } }
Doc 1: {
   "baz" : 2,
   "foo" : {
      "bar" : 1
   }
}
baz: 2
foo:
  bar: 1
KSS4 - Scalars on --- line
Tags:
1.3-err, anchor, header, scalar
View source
--- "quoted
string"
--- &node foo


$doc1 = "quoted string"
$doc2 = "foo"
Doc 1: "quoted string"

Doc 2: "foo"
"quoted string"
--- foo
KZN9 - Spec Example 7.21. Single Pair Implicit Entries
Tags:
1.3-err, flow, mapping, spec
View source
- [ YAML : separate ]
- [ : empty key entry ]
- [ {JSON: like}:adjacent ]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "- "
  at YAML/PP/Loader.pm line 52.



L94M - Tags in Explicit Mapping
Tags:
mapping, tag
View source
? !!str a
: !!int 47
? c
: !!str d


$doc1 = { a => 47, c => "d" }
Doc 1: {
   "a" : 47,
   "c" : "d"
}
a: 47
c: d
L9U5 - Spec Example 7.11. Plain Implicit Keys
Tags:
flow, mapping, spec
View source
implicit block key : [
  implicit flow key : value,
 ]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "implicit block key : "
  at YAML/PP/Loader.pm line 52.



LE5A - Spec Example 7.24. Flow Nodes
Tags:
alias, flow, spec, tag
View source
- !!str "a"
- 'b'
- &anchor "c"
- *anchor
- !!str


$doc1 = ["a", "b", "c", "c", undef]
Doc 1: [
   "a",
   "b",
   "c",
   "c",
   null
]
- a
- b
- c
- c
-
LP6E - Whitespace After Scalars in Flow
Tags:
flow, scalar, whitespace
View source
- [a, b , c ]
- { "a"  : b
   , c : 'd' ,
   e   : "f"
  }
- [      ]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "- "
  at YAML/PP/Loader.pm line 52.



LQZ7 - Spec Example 7.4. Double Quoted Implicit Keys
Tags:
flow, scalar, spec
View source
"implicit block key" : [
  "implicit flow key" : value,
 ]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "\"implicit block key\" : "
  at YAML/PP/Loader.pm line 52.



LX3P - Implicit Flow Mapping Key on one line
Tags:
1.3-err, flow, mapping, sequence
View source
[flow]: block
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



M29M - Literal Block Scalar
Tags:
scalar
View source
a: |
 ab
 
 cd
 ef
 

...


$doc1 = { a => "ab\n\ncd\nef\n" }
Doc 1: {
   "a" : "ab\n\ncd\nef\n"
}
a: "ab\n\ncd\nef\n"
M5C3 - Spec Example 8.21. Block Scalar Nodes
Tags:
1.3-err, folded, literal, spec
View source
literal: |2
  value
folded:
   !foo
  >1
 value


$doc1 = { folded => "value\n", literal => "value\n" }
Doc 1: {
   "folded" : "value\n",
   "literal" : "value\n"
}
folded: "value\n"
literal: "value\n"
M5DY - Spec Example 2.11. Mapping between Sequences
Tags:
mapping, sequence, spec
View source
? - Detroit Tigers
  - Chicago cubs
:
  - 2001-07-23

? [ New York Yankees,
    Atlanta Braves ]
: [ 2001-07-02, 2001-08-12,
    2001-08-14 ]
Line      : 6
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "? "
  at YAML/PP/Loader.pm line 52.



M7A3 - Spec Example 9.3. Bare Documents
Tags:
1.3-err, footer, spec
View source
Bare
document
...
# No document
...
|
%!PS-Adobe-2.0 # Not the first line


$doc1 = "Bare document"
$doc2 = undef
$doc3 = "%!PS-Adobe-2.0 # Not the first line\n"
Doc 1: "Bare document"

Doc 2: null

Doc 3: "%!PS-Adobe-2.0 # Not the first line\n"
"Bare document"
---
--- "%!PS-Adobe-2.0 # Not the first line\n"
M9B4 - Spec Example 8.7. Literal Scalar
Tags:
1.3-err, literal, scalar, spec
View source
|
 literal
 	text




$doc1 = "literal\n\ttext\n"
Doc 1: "literal\n\ttext\n"
"literal\n\ttext\n"
MJS9 - Spec Example 6.7. Block Folding
Tags:
1.3-err, scalar, spec, whitespace
View source
>
  foo 
 
  	 bar

  baz


$doc1 = "foo \n\n\t bar\n\nbaz\n"
Doc 1: "foo \n\n\t bar\n\nbaz\n"
"foo \n\n\t bar\n\nbaz\n"
MXS3 - Flow Mapping in Block Sequence
Tags:
flow, mapping, sequence
View source
- {a: b}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "- "
  at YAML/PP/Loader.pm line 52.



MYW6 - Block Scalar Strip
Tags:
1.3-err, scalar
View source
|-
 ab
 
 
...


$doc1 = "ab"
Doc 1: "ab"
ab
MZX3 - Non-Specific Tags on Scalars
Tags:
scalar, tag
View source
- plain
- "double quoted"
- 'single quoted'
- >
  block
- plain again


$doc1 = [
  "plain",
  "double quoted",
  "single quoted",
  "block\n",
  "plain again",
]
Doc 1: [
   "plain",
   "double quoted",
   "single quoted",
   "block\n",
   "plain again"
]
- plain
- "double quoted"
- "single quoted"
- "block\n"
- "plain again"
NHX8 - Empty Lines at End of Document
Tags:
whitespace
View source
:





$doc1 = { "" => undef }
Doc 1: {
   "" : null
}
"":
NP9H - Spec Example 7.5. Double Quoted Line Breaks
Tags:
scalar, spec, upto-1.2
View source
"folded 
to a space,	
 
to a line feed, or 	\
 \ 	non-content"


$doc1 = "folded to a space,\nto a line feed, or \t \tnon-content"
Doc 1: "folded to a space,\nto a line feed, or \t \tnon-content"
"folded to a space,\nto a line feed, or \t \tnon-content"
P2AD - Spec Example 8.1. Block Scalar Header
Tags:
comment, folded, literal, scalar, spec
View source
- | # Empty header↓
 literal
- >1 # Indentation indicator↓
  folded
- |+ # Chomping indicator↓
 keep

- >1- # Both indicators↓
  strip


$doc1 = ["literal\n", " folded\n", "keep\n\n", " strip"]
Doc 1: [
   "literal\n",
   " folded\n",
   "keep\n\n",
   " strip"
]
- "literal\n"
- " folded\n"
- "keep\n\n"
- " strip"
P76L - Spec Example 6.19. Secondary Tag Handle
Tags:
header, spec, tag
View source
%TAG !! tag:example.com,2000:app/
---
!!int 1 - 3 # Interval, not integer


$doc1 = "1 - 3"
Doc 1: "1 - 3"
"1 - 3"
P94K - Spec Example 6.11. Multi-Line Comments
Tags:
comment, spec
View source
key:    # Comment
        # lines
  value




$doc1 = { key => "value" }
Doc 1: {
   "key" : "value"
}
key: value
PBJ2 - Spec Example 2.3. Mapping Scalars to Sequences
Tags:
mapping, sequence, spec
View source
american:
  - Boston Red Sox
  - Detroit Tigers
  - New York Yankees
national:
  - New York Mets
  - Chicago Cubs
  - Atlanta Braves


$doc1 = {
  american => ["Boston Red Sox", "Detroit Tigers", "New York Yankees"],
  national => ["New York Mets", "Chicago Cubs", "Atlanta Braves"],
}
Doc 1: {
   "american" : [
      "Boston Red Sox",
      "Detroit Tigers",
      "New York Yankees"
   ],
   "national" : [
      "New York Mets",
      "Chicago Cubs",
      "Atlanta Braves"
   ]
}
american:
- "Boston Red Sox"
- "Detroit Tigers"
- "New York Yankees"
national:
- "New York Mets"
- "Chicago Cubs"
- "Atlanta Braves"
PRH3 - Spec Example 7.9. Single Quoted Lines
Tags:
scalar, spec, upto-1.2
View source
' 1st non-empty

 2nd non-empty 
	3rd non-empty '


$doc1 = " 1st non-empty\n2nd non-empty 3rd non-empty "
Doc 1: " 1st non-empty\n2nd non-empty 3rd non-empty "
" 1st non-empty\n2nd non-empty 3rd non-empty "
PW8X - Anchors on Empty Scalars
Tags:
anchor, empty, missing
View source
- &a
- a
-
  &a : a
  b: &b
  &c : &a
-
  ? &d
  ? &e
  : &a


$doc1 = [undef, "a", { "" => undef, "b" => undef }, { "" => undef }]
Doc 1: [
   null,
   "a",
   {
      "" : null,
      "b" : null
   },
   {
      "" : null
   }
]
-
- a
- "":
  b:
- "":
Q88A - Spec Example 7.23. Flow Content
Tags:
flow, mapping, sequence, spec
View source
- [ a, b ]
- { a: b }
- "a"
- 'b'
- c
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "- "
  at YAML/PP/Loader.pm line 52.



Q8AD - Spec Example 7.5. Double Quoted Line Breaks [1.3]
Tags:
1.3-mod, scalar, spec
View source
---
"folded 
to a space,
 
to a line feed, or 	\
 \ 	non-content"


$doc1 = "folded to a space,\nto a line feed, or \t \tnon-content"
Doc 1: "folded to a space,\nto a line feed, or \t \tnon-content"
"folded to a space,\nto a line feed, or \t \tnon-content"
Q9WF - Spec Example 6.12. Separation Spaces
Tags:
1.3-err, comment, spec, whitespace
View source
{ first: Sammy, last: Sosa }:
# Statistics:
  hr:  # Home runs
     65
  avg: # Average
   0.278
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



QF4Y - Spec Example 7.19. Single Pair Flow Mappings
Tags:
flow, mapping, spec
View source
[
foo: bar
]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



R4YG - Spec Example 8.2. Block Indentation Indicator
Tags:
folded, libyaml-err, literal, scalar, spec, upto-1.2
View source
- |
 detected
- >
 
  
  # detected
- |1
  explicit
- >
 	
 detected


$doc1 = ["detected\n", "\n\n# detected\n", " explicit\n", "\ndetected\n"]
Doc 1: [
   "detected\n",
   "\n\n# detected\n",
   " explicit\n",
   "\ndetected\n"
]
- "detected\n"
- "\n\n# detected\n"
- " explicit\n"
- "\ndetected\n"
RLU9 - Sequence Indent
Tags:
indent, sequence
View source
foo:
- 42
bar:
  - 44


$doc1 = { bar => [44], foo => [42] }
Doc 1: {
   "bar" : [
      44
   ],
   "foo" : [
      42
   ]
}
bar:
- 44
foo:
- 42
RR7F - Mixed Block Mapping (implicit to explicit)
Tags:
mapping
View source
a: 4.2
? 23
: d


$doc1 = { 23 => "d", a => 4.2 }
Doc 1: {
   "23" : "d",
   "a" : 4.2
}
23: d
a: 4.2
RTP8 - Spec Example 9.2. Document Markers
Tags:
footer, header, spec
View source
%YAML 1.2
---
Document
... # Suffix


$doc1 = "Document"
Doc 1: "Document"
Document
RZP5 - Various Trailing Comments [1.3]
Tags:
1.3-mod, comment
View source
a: "double
quotes" # lala
b: plain
 value  # lala
c  : #lala
  d
? # lala
 - seq1
: # lala
 - #lala
  seq2
e: &node # lala
 - x: y
block: > # lala
  abcde


$doc1 = {
  "['seq1']" => ["seq2"],
  "a" => "double quotes",
  "b" => "plain value",
  "block" => "abcde\n",
  "c" => "d",
  "e" => [{ x => "y" }],
}
Doc 1: {
   "['seq1']" : [
      "seq2"
   ],
   "a" : "double quotes",
   "b" : "plain value",
   "block" : "abcde\n",
   "c" : "d",
   "e" : [
      {
         "x" : "y"
      }
   ]
}
"['seq1']":
- seq2
a: "double quotes"
b: "plain value"
block: "abcde\n"
c: d
e:
- x: y
RZT7 - Spec Example 2.28. Log File
Tags:
header, literal, mapping, sequence, spec
View source
---
Time: 2001-11-23 15:01:42 -5
User: ed
Warning:
  This is an error message
  for the log file
---
Time: 2001-11-23 15:02:31 -5
User: ed
Warning:
  A slightly different error
  message.
---
Date: 2001-11-23 15:03:17 -5
User: ed
Fatal:
  Unknown variable "bar"
Stack:
  - file: TopClass.py
    line: 23
    code: |
      x = MoreObject("345\n")
  - file: MoreClass.py
    line: 58
    code: |-
      foo = bar


$doc1 = {
  Time    => "2001-11-23 15:01:42 -5",
  User    => "ed",
  Warning => "This is an error message for the log file",
}
$doc2 = {
  Time    => "2001-11-23 15:02:31 -5",
  User    => "ed",
  Warning => "A slightly different error message.",
}
$doc3 = {
  Date  => "2001-11-23 15:03:17 -5",
  Fatal => "Unknown variable \"bar\"",
  Stack => [
             {
               code => "x = MoreObject(\"345\\n\")\n",
               file => "TopClass.py",
               line => 23,
             },
             { code => "foo = bar", file => "MoreClass.py", line => 58 },
           ],
  User  => "ed",
}
Doc 1: {
   "Time" : "2001-11-23 15:01:42 -5",
   "User" : "ed",
   "Warning" : "This is an error message for the log file"
}

Doc 2: {
   "Time" : "2001-11-23 15:02:31 -5",
   "User" : "ed",
   "Warning" : "A slightly different error message."
}

Doc 3: {
   "Date" : "2001-11-23 15:03:17 -5",
   "Fatal" : "Unknown variable \"bar\"",
   "Stack" : [
      {
         "code" : "x = MoreObject(\"345\\n\")\n",
         "file" : "TopClass.py",
         "line" : 23
      },
      {
         "code" : "foo = bar",
         "file" : "MoreClass.py",
         "line" : 58
      }
   ],
   "User" : "ed"
}
Time: "2001-11-23 15:01:42 -5"
User: ed
Warning: "This is an error message for the log file"
---
Time: "2001-11-23 15:02:31 -5"
User: ed
Warning: "A slightly different error message."
---
Date: "2001-11-23 15:03:17 -5"
Fatal: "Unknown variable \"bar\""
Stack:
- code: "x = MoreObject(\"345\\n\")\n"
  file: TopClass.py
  line: 23
- code: "foo = bar"
  file: MoreClass.py
  line: 58
User: ed
S3PD - Spec Example 8.18. Implicit Block Mapping Entries
Tags:
mapping, spec
View source
plain key: in-line value
: # Both empty
"quoted key":
- entry


$doc1 = { "" => undef, "plain key" => "in-line value", "quoted key" => ["entry"] }
Doc 1: {
   "" : null,
   "plain key" : "in-line value",
   "quoted key" : [
      "entry"
   ]
}
"":
"plain key": "in-line value"
"quoted key":
- entry
S4JQ - Spec Example 6.28. Non-Specific Tags
Tags:
spec, tag
View source
# Assuming conventional resolution:
- "12"
- 12
- ! 12


$doc1 = [12, 12, 12]
Doc 1: [
   "12",
   12,
   12
]
- 12
- 12
- 12
S4T7 - Document with footer
Tags:
footer, mapping
View source
aaa: bbb
...


$doc1 = { aaa => "bbb" }
Doc 1: {
   "aaa" : "bbb"
}
aaa: bbb
S9E8 - Spec Example 5.3. Block Structure Indicators
Tags:
mapping, sequence, spec
View source
sequence:
- one
- two
mapping:
  ? sky
  : blue
  sea : green


$doc1 = {
  mapping  => { sea => "green", sky => "blue" },
  sequence => ["one", "two"],
}
Doc 1: {
   "mapping" : {
      "sea" : "green",
      "sky" : "blue"
   },
   "sequence" : [
      "one",
      "two"
   ]
}
mapping:
  sea: green
  sky: blue
sequence:
- one
- two
SBG9 - Flow Sequence in Flow Mapping
Tags:
flow, mapping, sequence
View source
{a: [b, c], [d, e]: f}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



SSW6 - Spec Example 7.7. Single Quoted Characters [1.3]
Tags:
1.3-mod, scalar, spec
View source
---
'here''s to "quotes"'


$doc1 = "here's to \"quotes\""
Doc 1: "here's to \"quotes\""
"here's to \"quotes\""
SYW4 - Spec Example 2.2. Mapping Scalars to Scalars
Tags:
comment, literal, scalar, spec
View source
hr:  65    # Home runs
avg: 0.278 # Batting average
rbi: 147   # Runs Batted In


$doc1 = { avg => 0.278, hr => 65, rbi => 147 }
Doc 1: {
   "avg" : 0.278,
   "hr" : 65,
   "rbi" : 147
}
avg: 0.278
hr: 65
rbi: 147
T26H - Spec Example 8.8. Literal Content [1.3]
Tags:
1.3-mod, comment, literal, scalar, spec
View source
--- |
 
  
  literal
   
  
  text

 # Comment


$doc1 = "\n\nliteral\n \n\ntext\n"
Doc 1: "\n\nliteral\n \n\ntext\n"
"\n\nliteral\n \n\ntext\n"
T4YY - Spec Example 7.9. Single Quoted Lines [1.3]
Tags:
1.3-mod, scalar, spec
View source
---
' 1st non-empty

 2nd non-empty 
 3rd non-empty '


$doc1 = " 1st non-empty\n2nd non-empty 3rd non-empty "
Doc 1: " 1st non-empty\n2nd non-empty 3rd non-empty "
" 1st non-empty\n2nd non-empty 3rd non-empty "
T5N4 - Spec Example 8.7. Literal Scalar [1.3]
Tags:
1.3-mod, literal, scalar, spec
View source
--- |
 literal
 	text




$doc1 = "literal\n\ttext\n"
Doc 1: "literal\n\ttext\n"
"literal\n\ttext\n"
TE2A - Spec Example 8.16. Block Mappings
Tags:
mapping, spec
View source
block mapping:
 key: value


$doc1 = { "block mapping" => { key => "value" } }
Doc 1: {
   "block mapping" : {
      "key" : "value"
   }
}
"block mapping":
  key: value
TL85 - Spec Example 6.8. Flow Folding
Tags:
scalar, spec, upto-1.2, whitespace
View source
"
  foo 
 
  	 bar

  baz
"


$doc1 = " foo\nbar\nbaz "
Doc 1: " foo\nbar\nbaz "
" foo\nbar\nbaz "
TS54 - Folded Block Scalar
Tags:
1.3-err, scalar
View source
>
 ab
 cd
 
 ef


 gh


$doc1 = "ab cd\nef\n\ngh\n"
Doc 1: "ab cd\nef\n\ngh\n"
"ab cd\nef\n\ngh\n"
U3C3 - Spec Example 6.16. “TAG” directive
Tags:
header, spec, tag
View source
%TAG !yaml! tag:yaml.org,2002:
---
!yaml!str "foo"


$doc1 = "foo"
Doc 1: "foo"
foo
U3XV - Node and Mapping Key Anchors
Tags:
1.3-err, anchor, comment
View source
---
top1: &node1
  &k1 key1: one
top2: &node2 # comment
  key2: two
top3:
  &k3 key3: three
top4:
  &node4
  &k4 key4: four
top5:
  &node5
  key5: five
top6: &val6
  six
top7:
  &val7 seven


$doc1 = {
  top1 => { key1 => "one" },
  top2 => { key2 => "two" },
  top3 => { key3 => "three" },
  top4 => { key4 => "four" },
  top5 => { key5 => "five" },
  top6 => "six",
  top7 => "seven",
}
Doc 1: {
   "top1" : {
      "key1" : "one"
   },
   "top2" : {
      "key2" : "two"
   },
   "top3" : {
      "key3" : "three"
   },
   "top4" : {
      "key4" : "four"
   },
   "top5" : {
      "key5" : "five"
   },
   "top6" : "six",
   "top7" : "seven"
}
top1:
  key1: one
top2:
  key2: two
top3:
  key3: three
top4:
  key4: four
top5:
  key5: five
top6: six
top7: seven
U9NS - Spec Example 2.8. Play by Play Feed from a Game
Tags:
header, spec
View source
---
time: 20:03:20
player: Sammy Sosa
action: strike (miss)
...
---
time: 20:03:47
player: Sammy Sosa
action: grand slam
...


$doc1 = { action => "strike (miss)", player => "Sammy Sosa", time => "20:03:20" }
$doc2 = { action => "grand slam", player => "Sammy Sosa", time => "20:03:47" }
Doc 1: {
   "action" : "strike (miss)",
   "player" : "Sammy Sosa",
   "time" : "20:03:20"
}

Doc 2: {
   "action" : "grand slam",
   "player" : "Sammy Sosa",
   "time" : "20:03:47"
}
action: "strike (miss)"
player: "Sammy Sosa"
time: "20:03:20"
---
action: "grand slam"
player: "Sammy Sosa"
time: "20:03:47"
UDR7 - Spec Example 5.4. Flow Collection Indicators
Tags:
flow, mapping, sequence, spec
View source
sequence: [ one, two, ]
mapping: { sky: blue, sea: green }
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "sequence: "
  at YAML/PP/Loader.pm line 52.



UGM3 - Spec Example 2.27. Invoice
Tags:
alias, literal, mapping, sequence, spec, tag
View source
--- !<tag:clarkevans.com,2002:invoice>
invoice: 34843
date   : 2001-01-23
bill-to: &id001
    given  : Chris
    family : Dumars
    address:
        lines: |
            458 Walkman Dr.
            Suite #292
        city    : Royal Oak
        state   : MI
        postal  : 48046
ship-to: *id001
product:
    - sku         : BL394D
      quantity    : 4
      description : Basketball
      price       : 450.00
    - sku         : BL4438H
      quantity    : 1
      description : Super Hoop
      price       : 2392.00
tax  : 251.42
total: 4443.52
comments:
    Late afternoon is best.
    Backup contact is Nancy
    Billsmer @ 338-4338.


$doc1 = do {
  my $a = {
    "bill-to"  => {
                    address => {
                                 city   => "Royal Oak",
                                 lines  => "458 Walkman Dr.\nSuite #292\n",
                                 postal => 48046,
                                 state  => "MI",
                               },
                    family  => "Dumars",
                    given   => "Chris",
                  },
    "comments" => "Late afternoon is best. Backup contact is Nancy Billsmer \@ 338-4338.",
    "date"     => "2001-01-23",
    "invoice"  => 34843,
    "product"  => [
                    { description => "Basketball", price => 450, quantity => 4, sku => "BL394D" },
                    { description => "Super Hoop", price => 2392, quantity => 1, sku => "BL4438H" },
                  ],
    "ship-to"  => 'fix',
    "tax"      => 251.42,
    "total"    => 4443.52,
  };
  $a->{"ship-to"} = $a->{"bill-to"};
  $a;
}
Doc 1: {
   "bill-to" : {
      "address" : {
         "city" : "Royal Oak",
         "lines" : "458 Walkman Dr.\nSuite #292\n",
         "postal" : 48046,
         "state" : "MI"
      },
      "family" : "Dumars",
      "given" : "Chris"
   },
   "comments" : "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.",
   "date" : "2001-01-23",
   "invoice" : 34843,
   "product" : [
      {
         "description" : "Basketball",
         "price" : 450,
         "quantity" : 4,
         "sku" : "BL394D"
      },
      {
         "description" : "Super Hoop",
         "price" : 2392,
         "quantity" : 1,
         "sku" : "BL4438H"
      }
   ],
   "ship-to" : {
      "address" : {
         "city" : "Royal Oak",
         "lines" : "458 Walkman Dr.\nSuite #292\n",
         "postal" : 48046,
         "state" : "MI"
      },
      "family" : "Dumars",
      "given" : "Chris"
   },
   "tax" : 251.42,
   "total" : 4443.52
}
bill-to: &1
  address:
    city: "Royal Oak"
    lines: "458 Walkman Dr.\nSuite #292\n"
    postal: 48046
    state: MI
  family: Dumars
  given: Chris
comments: "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338."
date: 2001-01-23
invoice: 34843
product:
- description: Basketball
  price: 450
  quantity: 4
  sku: BL394D
- description: "Super Hoop"
  price: 2392
  quantity: 1
  sku: BL4438H
ship-to: *1
tax: 251.42
total: 4443.52
UT92 - Spec Example 9.4. Explicit Documents
Tags:
comment, footer, header, spec
View source
---
{ matches
% : 20 }
...
---
# Empty
...
Line      : 2
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



V55R - Aliases in Block Sequence
Tags:
alias, sequence
View source
- &a a
- &b b
- *a
- *b


$doc1 = ["a", "b", "a", "b"]
Doc 1: [
   "a",
   "b",
   "a",
   "b"
]
- a
- b
- a
- b
V9D5 - Spec Example 8.19. Compact Block Mappings
Tags:
mapping, spec
View source
- sun: yellow
- ? earth: blue
  : moon: white


$doc1 = [
  { sun => "yellow" },
  { "{earth => 'blue'}" => { moon => "white" } },
]
Doc 1: [
   {
      "sun" : "yellow"
   },
   {
      "{earth => 'blue'}" : {
         "moon" : "white"
      }
   }
]
- sun: yellow
- "{earth => 'blue'}":
    moon: white
W42U - Spec Example 8.15. Block Sequence Entry Types
Tags:
literal, sequence, spec
View source
- # Empty
- |
 block node
- - one # Compact
  - two # sequence
- one: two # Compact mapping


$doc1 = [undef, "block node\n", ["one", "two"], { one => "two" }]
Doc 1: [
   null,
   "block node\n",
   [
      "one",
      "two"
   ],
   {
      "one" : "two"
   }
]
-
- "block node\n"
- - one
  - two
- one: two
W4TN - Spec Example 9.5. Directives Documents
Tags:
1.3-err, footer, header, spec
View source
%YAML 1.2
--- |
%!PS-Adobe-2.0
...
%YAML1.2
---
# Empty
...


$doc1 = "%!PS-Adobe-2.0\n"
$doc2 = undef
Doc 1: "%!PS-Adobe-2.0\n"

Doc 2: null
"%!PS-Adobe-2.0\n"
---
W5VH - Allowed characters in alias
Tags:
1.3-err, alias
View source
a: &:@*!$"<foo>: scalar a
b: *:@*!$"<foo>:


$doc1 = { a => "scalar a", b => "scalar a" }
Doc 1: {
   "a" : "scalar a",
   "b" : "scalar a"
}
a: "scalar a"
b: "scalar a"
WZ62 - Spec Example 7.2. Empty Content
Tags:
flow, scalar, spec
View source
{
  foo : !!str,
  !!str : bar,
}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



X38W - Aliases in Flow Objects
Tags:
alias, flow
View source
{ &a [a, &b b]: *b, *a : [c, *b, d]}
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



XV9V - Spec Example 6.5. Empty Lines [1.3]
Tags:
1.3-mod, scalar, spec
View source
Folding:
  "Empty line

  as a line feed"
Chomping: |
  Clipped empty lines
 



$doc1 = {
  Chomping => "Clipped empty lines\n",
  Folding  => "Empty line\nas a line feed",
}
Doc 1: {
   "Chomping" : "Clipped empty lines\n",
   "Folding" : "Empty line\nas a line feed"
}
Chomping: "Clipped empty lines\n"
Folding: "Empty line\nas a line feed"
XW4D - Various Trailing Comments
Tags:
1.3-err, comment
View source
a: "double
quotes" # lala
b: plain
 value  # lala
c  : #lala
  d
? # lala
 - seq1
: # lala
 - #lala
  seq2
e:
 &node # lala
 - x: y
block: > # lala
  abcde


$doc1 = {
  "['seq1']" => ["seq2"],
  "a" => "double quotes",
  "b" => "plain value",
  "block" => "abcde\n",
  "c" => "d",
  "e" => [{ x => "y" }],
}
Doc 1: {
   "['seq1']" : [
      "seq2"
   ],
   "a" : "double quotes",
   "b" : "plain value",
   "block" : "abcde\n",
   "c" : "d",
   "e" : [
      {
         "x" : "y"
      }
   ]
}
"['seq1']":
- seq2
a: "double quotes"
b: "plain value"
block: "abcde\n"
c: d
e:
- x: y
YD5X - Spec Example 2.5. Sequence of Sequences
Tags:
sequence, spec
View source
- [name        , hr, avg  ]
- [Mark McGwire, 65, 0.278]
- [Sammy Sosa  , 63, 0.288]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "- "
  at YAML/PP/Loader.pm line 52.



Z67P - Spec Example 8.21. Block Scalar Nodes [1.3]
Tags:
1.3-mod, folded, literal, spec
View source
literal: |2
  value
folded: !foo >1
 value


$doc1 = { folded => "value\n", literal => "value\n" }
Doc 1: {
   "folded" : "value\n",
   "literal" : "value\n"
}
folded: "value\n"
literal: "value\n"
Z9M4 - Spec Example 6.22. Global Tag Prefix
Tags:
header, spec, tag
View source
%TAG !e! tag:example.com,2000:app/
---
- !e!foo "bar"


$doc1 = ["bar"]
Doc 1: [
   "bar"
]
- bar
ZF4X - Spec Example 2.6. Mapping of Mappings
Tags:
mapping, spec
View source
Mark McGwire: {hr: 65, avg: 0.278}
Sammy Sosa: {
    hr: 63,
    avg: 0.288
  }
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "Mark McGwire: "
  at YAML/PP/Loader.pm line 52.



ZH7C - Anchors in Mapping
Tags:
jayt
View source
&a a: b
c: &d d


$doc1 = { a => "b", c => "d" }
Doc 1: {
   "a" : "b",
   "c" : "d"
}
a: b
c: d

Invalid

YAML::PP::Highlight YAML::PP::Loader | Data::Dump YAML::PP::Loader | JSON::XS YAML::PP::Loader | YAML::PP::Dumper
236B - Invalid value after mapping
Tags:
error, mapping
View source
foo:
  bar
invalid
Line      : 3
Message   : Expected MAP
Where     : YAML/PP/Parser.pm line 449
YAML      : ""
  at YAML/PP/Loader.pm line 52.



2CMS - Invalid mapping in plain multiline
Tags:
error, mapping
View source
this
 is
  invalid: x
Line      : 3
Message   : Unexpected content
Where     : YAML/PP/Lexer.pm line 333
YAML      : ": x"
  at YAML/PP/Loader.pm line 52.



3HFZ - Invalid content after document end marker
Tags:
error, footer
View source
---
key: value
... invalid
Line      : 3
Message   : Expected EOL
Where     : YAML/PP/Lexer.pm line 481
YAML      : "..."
  at YAML/PP/Loader.pm line 52.



4HVU - Wrong indendation in Sequence
Tags:
error, indent, sequence
View source
key:
   - ok
   - also ok
  - wrong
Line      : 4
Message   : Expected MAP
Where     : YAML/PP/Parser.pm line 346
YAML      : "- wrong"
  at YAML/PP/Loader.pm line 52.



4JVG - Scalar value with two anchors
Tags:
anchor, error
View source
top1: &node1
  &k1 key1: val1
top2: &node2
  &v2 val2
Line      : 4
Message   : Expected new node (FULLMAPVALUE)
Where     : YAML/PP/Parser.pm line 449
YAML      : ""
  at YAML/PP/Loader.pm line 52.



55WF - Invalid escape in double quoted string
Tags:
double, error
View source
---
"\."


$doc1 = "\\."
Doc 1: "\\."
"\\."
5TRB - Invalid document-start marker in doublequoted tring
Tags:
double, error, header
View source
---
"
---
"


$doc1 = " --- "
Doc 1: " --- "
" --- "
5U3A - Sequence on same Line as Mapping Key
Tags:
error, mapping, sequence
View source
key: - a
     - b
Line      : 1
Message   : Expected new node (FULLMAPVALUE)
Where     : YAML/PP/Parser.pm line 449
YAML      : "- a"
  at YAML/PP/Loader.pm line 52.



6S55 - Invalid scalar at the end of sequence
Tags:
error, mapping, sequence
View source
key:
 - bar
 - baz
 invalid
Line      : 4
Message   : Expected sequence item
Where     : YAML/PP/Parser.pm line 341
YAML      : "invalid"
  at YAML/PP/Loader.pm line 52.



7LBH - Multiline double quoted implicit keys
Tags:
error
View source
"a\nb": 1
"c
 d": 1
Line      : 2
Message   : Expected MAP
Where     : YAML/PP/Parser.pm line 449
YAML      : "c"
  at YAML/PP/Loader.pm line 52.



7MNF - Missing colon
Tags:
error, mapping
View source
top1:
  key1: val1
top2
Line      : 3
Message   : Expected MAP
Where     : YAML/PP/Parser.pm line 449
YAML      : ""
  at YAML/PP/Loader.pm line 52.



8XDJ - Comment in plain multiline value
Tags:
comment, error, scalar
View source
key: word1
#  xxx
  word2
Line      : 3
Message   : Bad indendation in MAP
Where     : YAML/PP/Parser.pm line 302
YAML      : "word2"
  at YAML/PP/Loader.pm line 52.



9CWY - Invalid scalar at the end of mapping
Tags:
error, mapping, sequence
View source
key:
 - item1
 - item2
invalid
Line      : 4
Message   : Expected MAP
Where     : YAML/PP/Parser.pm line 449
YAML      : ""
  at YAML/PP/Loader.pm line 52.



9KBC - Mapping starting at --- line
Tags:
error, header, mapping
View source
--- key1: value1
    key2: value2
Line      : 1
Message   : Expected new node (FULLSTARTNODE)
Where     : YAML/PP/Parser.pm line 449
YAML      : ": value1"
  at YAML/PP/Loader.pm line 52.



B63P - Directive without document
Tags:
directive, document, error
View source
%YAML 1.2
...
Line      : 2
Message   : Expected ---
Where     : YAML/PP/Parser.pm line 197
YAML      : "..."
  at YAML/PP/Loader.pm line 52.



BD7L - Invalid mapping after sequence
Tags:
error, mapping, sequence
View source
- item1
- item2
invalid: x
Line      : 3
Message   : Expected sequence item
Where     : YAML/PP/Parser.pm line 341
YAML      : "invalid: x"
  at YAML/PP/Loader.pm line 52.



BS4K - Comment between plain scalar lines
Tags:
error
View source
word1  # comment
word2
Line      : 2
Message   : Expected ---
Where     : YAML/PP/Parser.pm line 197
YAML      : "word2"
  at YAML/PP/Loader.pm line 52.



C2SP - Flow Mapping Key on two lines
Tags:
error, flow, mapping
View source
[23
]: 42
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



CML9 - Missing comma in flow
Tags:
comment, error, flow
View source
key: [ word1
#  xxx
  word2 ]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : "key: "
  at YAML/PP/Loader.pm line 52.



CQ3W - Double quoted string without closing quote
Tags:
double, error
View source
---
key: "missing closing quote
Line      : 2
Message   : Expected new node (FULLMAPVALUE)
Where     : YAML/PP/Parser.pm line 449
YAML      : ""
  at YAML/PP/Loader.pm line 52.



D49Q - Multiline single quoted implicit keys
Tags:
error, mapping, single
View source
'a\nb': 1
'c
 d': 1
Line      : 2
Message   : Expected MAP
Where     : YAML/PP/Parser.pm line 449
YAML      : "c"
  at YAML/PP/Loader.pm line 52.



DMG6 - Wrong indendation in Map
Tags:
error, indent, mapping
View source
key:
  ok: 1
 wrong: 2
Line      : 3
Message   : Expected MAP
Where     : YAML/PP/Parser.pm line 346
YAML      : "wrong: 2"
  at YAML/PP/Loader.pm line 52.



EB22 - Missing document-end marker before directive
Tags:
directive, error, footer
View source
---
scalar1 # comment
%YAML 1.2
---
scalar2
Line      : 3
Message   : Expected ---
Where     : YAML/PP/Parser.pm line 188
YAML      : "%YAML 1.2"
  at YAML/PP/Loader.pm line 52.



EW3V - Wrong indendation in mapping
Tags:
error, indent, mapping
View source
k1: v1
 k2: v2
Line      : 2
Message   : Unexpected content
Where     : YAML/PP/Lexer.pm line 333
YAML      : ": v2"
  at YAML/PP/Loader.pm line 52.



G7JE - Multiline implicit keys
Tags:
error, mapping
View source
a\nb: 1
c
 d: 1
Line      : 2
Message   : Expected MAP
Where     : YAML/PP/Parser.pm line 449
YAML      : ""
  at YAML/PP/Loader.pm line 52.



GT5M - Node anchor in sequence
Tags:
anchor, error, sequence
View source
- item1
&node
- item2
Line      : 2
Message   : Expected sequence item
Where     : YAML/PP/Parser.pm line 341
YAML      : "&node"
  at YAML/PP/Loader.pm line 52.



H7J7 - Node anchor not indented
Tags:
anchor, error, indent
View source
key: &x
!y
  a: b
Line      : 2
Message   : Expected MAP
Where     : YAML/PP/Parser.pm line 449
YAML      : ""
  at YAML/PP/Loader.pm line 52.



HU3P - Invalid Mapping in plain scalar
Tags:
error, mapping, scalar
View source
key:
  word1 word2
  no: key
Line      : 3
Message   : Unexpected content
Where     : YAML/PP/Lexer.pm line 333
YAML      : ": key"
  at YAML/PP/Loader.pm line 52.



JY7Z - Trailing content that looks like a mapping
Tags:
double, error, mapping
View source
key1: "quoted1"
key2: "quoted2" no key: nor value
key3: "quoted3"
Line      : 2
Message   : Expected new node (FULLMAPVALUE)
Where     : YAML/PP/Parser.pm line 449
YAML      : "no key: nor value"
  at YAML/PP/Loader.pm line 52.



N4JP - Bad indentation in mapping
Tags:
double, error, indent, mapping
View source
map:
  key1: "quoted1"
 key2: "bad indentation"
Line      : 3
Message   : Expected MAP
Where     : YAML/PP/Parser.pm line 346
YAML      : "key2: \"bad indentation\""
  at YAML/PP/Loader.pm line 52.



N782 - Invalid document markers in flow style
Tags:
edge, error, flow, footer, header
View source
[
--- ,
...
]
Line      : 1
Message   : Not Implemented: Flow Style
Where     : YAML/PP/Lexer.pm line 492
YAML      : ""
  at YAML/PP/Loader.pm line 52.



Q4CL - Trailing content after quoted value
Tags:
double, error, mapping
View source
key1: "quoted1"
key2: "quoted2" trailing content
key3: "quoted3"
Line      : 2
Message   : Expected new node (FULLMAPVALUE)
Where     : YAML/PP/Parser.pm line 449
YAML      : "trailing content"
  at YAML/PP/Loader.pm line 52.



Q5MG - Tab at beginning of line followed by a flow mapping
Tags:
error, flow, whitespace
View source
	{}
Line      : 1
Message   : Invalid plain scalar
Where     : YAML/PP/Lexer.pm line 623
YAML      : ""
  at YAML/PP/Loader.pm line 52.



QLJ7 - Tag shorthand used in documents but only defined in the first
Tags:
directive, error, tag
View source
%TAG !prefix! tag:example.com,2011:
--- !prefix!A
a: b
--- !prefix!B
c: d
--- !prefix!C
e: f
Found undefined tag handle '!prefix!' at YAML/PP/Render.pm line 28.
 at YAML/PP/Loader.pm line 52.



RXY3 - Invalid document-end marker in single quoted string
Tags:
error, footer, single
View source
---
'
...
'


$doc1 = " ... "
Doc 1: " ... "
" ... "
SR86 - Anchor plus Alias
Tags:
alias, error
View source
key1: &a value
key2: &b *a
Line      : 2
Message   : Parse error: Alias not allowed in this context
Where     : YAML/PP/Parser.pm line 382
YAML      : ""
  at YAML/PP/Loader.pm line 52.



SU5Z - Comment without whitespace after doublequoted scalar
Tags:
comment, double, error, whitespace
View source
key: "value"# invalid comment
Line      : 1
Message   : Invalid plain scalar
Where     : YAML/PP/Lexer.pm line 623
YAML      : "key: \"value\""
  at YAML/PP/Loader.pm line 52.



SU74 - Anchor and alias as mapping key
Tags:
alias, anchor, error, mapping
View source
key1: &alias value1
&b *alias : value2
Line      : 2
Message   : Parse error: Alias not allowed in this context
Where     : YAML/PP/Parser.pm line 382
YAML      : "value2"
  at YAML/PP/Loader.pm line 52.



SY6V - Anchor before sequence entry on same line
Tags:
anchor, error, sequence
View source
&anchor - sequence entry


$doc1 = ["sequence entry"]
Doc 1: [
   "sequence entry"
]
- "sequence entry"
TD5N - Invalid scalar after sequence
Tags:
error, scalar, sequence
View source
- item1
- item2
invalid
Line      : 3
Message   : Expected sequence item
Where     : YAML/PP/Parser.pm line 341
YAML      : "invalid"
  at YAML/PP/Loader.pm line 52.



U44R - Bad indentation in mapping
Tags:
double, error, indent, mapping
View source
map:
  key1: "quoted1"
   key2: "bad indentation"
Line      : 3
Message   : Bad indendation in MAP
Where     : YAML/PP/Parser.pm line 302
YAML      : "key2: \"bad indentation\""
  at YAML/PP/Loader.pm line 52.



X4QW - Comment without whitespace after block scalar indicator
Tags:
block, comment, error, whitespace
View source
block: ># comment
  scalar
Line      : 1
Message   : Invalid plain scalar
Where     : YAML/PP/Lexer.pm line 623
YAML      : "block: >"
  at YAML/PP/Loader.pm line 52.



ZCZ6 - Invalid mapping in plain single line value
Tags:
error, mapping, scalar
View source
a: b: c: d
Line      : 1
Message   : Expected new node (FULLMAPVALUE)
Where     : YAML/PP/Parser.pm line 449
YAML      : ": c: d"
  at YAML/PP/Loader.pm line 52.



ZVH3 - Wrong indented sequence item
Tags:
error, indent, sequence
View source
- key: value
 - item1
Line      : 2
Message   : Expected SEQ
Where     : YAML/PP/Parser.pm line 346
YAML      : "- item1"
  at YAML/PP/Loader.pm line 52.