
- YAML Tutorial
- YAML - Home
- YAML – Introduction
- YAML – Basics
- YAML – Indentation and Separation
- YAML – Comments
- YAML – Collections and Structures
- YAML – Scalars and Tags
- YAML – Full Length Example
- YAML – Processes
- YAML – Information Models
- YAML – Syntax Characters
- YAML – Syntax Primitives
- YAML – Character Streams
- YAML – Node Properties
- YAML – Block Scalar Header
- YAML – Flow Styles
- YAML – Block Styles
- YAML – Sequence Styles
- YAML – Flow Mappings
- YAML – Block Sequences
- YAML – Failsafe Schema
- YAML – JSON Schema
- YAML Useful Resources
- YAML - Quick Guide
- YAML - Useful Resources
- YAML - Discussion
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