- YAML – JSON Schema
- YAML – Failsafe Schema
- YAML – Block Sequences
- YAML – Flow Mappings
- YAML – Sequence Styles
- YAML – Block Styles
- YAML – Flow Styles
- YAML – Block Scalar Header
- YAML – Node Properties
- YAML – Character Streams
- YAML – Syntax Primitives
- YAML – Syntax Characters
- YAML – Information Models
- YAML – Processes
- YAML – Full Length Example
- YAML – Scalars and Tags
- YAML – Collections and Structures
- YAML – Comments
- YAML – Indentation and Separation
- YAML – Basics
- YAML – Introduction
- YAML - Home
YAML Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
YAML - Syntax Characters
Various types of characters are used for various functionapties. This chapter talks in detail about syntax used in YAML and focuses on character manipulation.
Indicator Characters
Indicator characters include a special semantics used to describe the content of YAML document. The following table shows this in detail.
Sr.No. | Character & Functionapty |
---|---|
1 | _ It denotes a block sequence entry |
2 | ? It denotes a mapping key |
3 | : It denotes a mapping value |
4 | , It denotes flow collection entry |
5 | [ It starts a flow sequence |
6 | ] It ends a flow sequence |
7 | { It starts a flow mapping |
8 | } It ends a flow mapping |
9 | # It denotes the comments |
10 | & It denotes node’s anchor property |
11 | * It denotes apas node |
12 | ! It denotes node’s tag |
13 | | It denotes a pteral block scalar |
14 | > It denotes a folded block scalar |
15 | ` Single quote surrounds a quoted flow scalar |
16 | " Double quote surrounds double quoted flow scalar |
17 | % It denotes the directive used |
The following example shows the characters used in syntax −
%YAML 1.1 --- !!map { ? !!str "sequence" : !!seq [ !!str "one", !!str "two" ], ? !!str "mapping" : !!map { ? !!str "sky" : !!str "blue", ? !!str "sea" : !!str "green", } } # This represents # only comments. --- !!map1 { ? !!str "anchored" : !local &A1 "value", ? !!str "apas" : *A1, } !!str "text"Advertisements