Symbol(s) Unicode name(s) of symbol Rule(s)
# hashtag for single line commenting
- dash followed by a space for creating sequences (list member)
[ ] square brackets also works for creating lists
Character sets and the rules in YAML
General
YAML

Which special character used for what?

Description :
Symbol(s) Unicode name(s) of symbol Rule(s)
# hashtag for single line commenting
true / false returns boolean
- dash followed by a space for creating sequences (list member)
[ ] square brackets also works for creating lists
| pipe used to write multiline strings and to keep as multline string (Newlines preserved)
> greater than used to write multiline strings and to converts it to single line string (Newlines are not preserved)
$ dollar forwards environment variable into strings
{{ }} double curly bracket placeholder
--- three sequantial dash used as seperator in multi documents
& ampersand used to declare an object as anchor (like pointers)
* asteriks used to call the object with anchor with the same name (called as alias)
<<: double less than followed by colon refers to an object called with an alias, it is possible to override the predefined attribute.
!!str / !!int / !!bool double exclamation followed by datatype data type casting
Example :

2025 Jan