- 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 - Introduction
YAML Ain t Markup Language is a data seriapzation language that matches user’s expectations about data. It designed to be human friendly and works perfectly with other programming languages. It is useful to manage data and includes Unicode printable characters. This chapter will give you an introduction to YAML and gives you an idea about its features.
Format
Consider the text shown below −
Quick brown fox jumped over the lazy dog.
The YAML text for this will be represented as shown below −
yaml.load(Quick brown fox jumped over the lazy dog.) >> Quick brown fox jumped over the lazy dog.
Note that YAML takes the value in string format and represents the output as mentioned above.
Examples
Let us understand the formats in YAML with the help of the following examples −
Consider the following point number of “pi”, which has a value of 3.1415926. In YAML, it is represented as a floating number as shown below −
>>> yaml.load( 3.1415926536 ) 3.1415926536
Suppose, multiple values are to be loaded in specific data structure as mentioned below −
eggs ham spam French basil salmon terrine
When you load this into YAML, the values are taken in an array data structure which is a form of pst. The output is as shown below −
>>> yaml.load( - eggs - ham - spam - French basil salmon terrine ) [ eggs , ham , spam , French basil salmon terrine ]
Features
YAML includes a markup language with important construct, to distinguish data-oriented language with the document markup. The design goals and features of YAML are given below −
Matches native data structures of agile methodology and its languages such as Perl, Python, PHP, Ruby and JavaScript
YAML data is portable between programming languages
Includes data consistent data model
Easily readable by humans
Supports one-direction processing
Ease of implementation and usage