YAML Tutorial
YAML Useful Resources
Selected Reading
- 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 – Block Sequences
YAML - Block Sequences
The block sequences of YAML represent a series of nodes. Each item is denoted by a leading “-“ indicator. Note that the “-“ indicator in YAML should be separated from the node with a white space.
The basic representation of block sequence is given below −
block sequence: ··- one↓ - two : three↓
Example
Observe the following examples for a better understanding of block sequences.
Example 1
port: &ports adapter: postgres host: localhost development: database: myapp_development <<: *ports
The output of block sequences in JSON format is given below −
{ "port": { "adapter": "postgres", "host": "localhost" }, "development": { "database": "myapp_development", "adapter": "postgres", "host": "localhost" } }Advertisements