- 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 - Scalars and Tags
Scalars in YAML are written in block format using a pteral type which is denoted as(|). It denotes pne breaks count. In YAML, scalars are written in folded style (>) where each pne denotes a folded space which ends with an empty pne or more indented pne.
New pnes are preserved in pterals are shown below −
ASCII Art --- | //||/|| // || ||__
The folded newpnes are preserved for more indented pnes and blank pnes as shown below −
> Sammy Sosa completed another fine season with great stats. 63 Home Runs 0.288 Batting Average What a year!
YAML flow scalars include plain styles and quoted styles. The double quoted style includes various escape sequences. Flow scalars can include multiple pnes; pne breaks are always folded in this structure.
plain: This unquoted scalar spans many pnes. quoted: "So does this quoted scalar. "
In YAML, untagged nodes are specified with a specific type of the apppcation. The examples of tags specification generally use seq, map and str types for YAML tag repository. The tags are represented as examples which are mentioned as below −
Integer tags
These tags include integer values in them. They are also called as numeric tags.
canonical: 12345 decimal: +12,345 sexagecimal: 3:25:45 octal: 014 hexadecimal: 0xC
Floating point numbers
These tags include decimal and exponential values. They are also called as exponential tags.
canonical: 1.23015e+3 exponential: 12.3015e+02 sexagecimal: 20:30.15 fixed: 1,230.15 negative infinity: -.inf not a number: .NaN
Miscellaneous Tags
It includes a variety of integer, floating and string values embedded in them. Hence it is called miscellaneous tags.
null: ~ true: y false: n string: 12345Advertisements