Welcome to Day 77 of the #100DaysOfDevOps Challenge! Today we will see about Characters in YAML Language
YAML Characters:
YAML is made to support Unicode. The problem is that all Unicode is not included in that.
YAML can support anything in the C0/C1 blocks, which are called the control blocks. These control blocks don't have any actually represented symbols like letter 'a' or 'colon'. These are the special or structural bits of Unicode that is used to show the end of a transmission.
There are some exceptions in YAML like it can support tabs as long as they are not used in the indentation. YAML also supports line feeds, delete symbol, and next line symbol.
YAML does not support surrogates, which is a combination of 16-bit Unicode characters.
YAML does not support all types of encoding. It only supports UTF-8, UTF-16, and UTF-32. If we want to make our YAML compatible with JSON, we have to use the UTF-32.
Indicator Characters
It includes a special semantic. The content of the YAML document is described by this semantic as follows:
S. N. | Character | Functionality | |
1 | : | It is used to describe the mapping value. | |
2 | - | It describes the entry of the block sequence. | |
3 | , | It describes the entry of flow collection. | |
4 | ? | It is used to describe the mapping key. | |
5 | ! | It describes the tag of a node. | |
6 | & | It describes the anchor property of a node. | |
7 | It is used to describe the literal block scalar. | ||
8 | # | It is used to describe the comments. | |
9 | \> | It is used to describe the folded block scalar. | |
10 | { | It is used to start the mapping of flow. | |
11 | } | It is used to end the mapping of flow. | |
12 | [ | It is used to start the sequence of flow. | |
13 | ] | It is used to end the sequence of flow. | |
14 | % | It describes the use of directives. | |
15 | * | It is used to describe the alias node |