YAML
Block Style
Indentation-based nesting.
By EZ4Code Team
blockindentation
Code
server:
host: localhost
port: 8080
routes:
home:
path: /
method: GET
api:
path: /api
method: POST
auth: requiredExplanation
Block style expresses nesting through indentation, which must be consistent spaces (tabs are forbidden). Deeper indent means a child of the preceding less-indented key. Block style is the most readable form for configuration and is the default for most YAML files.
More YAML Snippets
Scalars
Strings, numbers, booleans, null, and dates.
Sequences and Mappings
Lists and key-value maps.
Anchors and Aliases
Reuse nodes with anchors, aliases, and merge keys.
Multi-Document
Several documents in one stream.
Tags
Explicit type tags for custom resolution.
Flow Style
Inline JSON-like sequences and mappings.