Reference1 min
YAML Syntax Reference
Complete YAML syntax reference
YAML Syntax Reference
A concise YAML syntax guide.
📝 Basic Syntax
Keys and Values
key: value
name: YAMLforge
port: 8080Nesting
parent:
child: value
nested:
deep: data📊 Data Types
| Type | Example |
|---|---|
| String | name: hello |
| Integer | count: 42 |
| Float | price: 19.99 |
| Boolean | enabled: true |
| null | data: null or data: ~ |
📋 Arrays
# Hyphen format
items:
- item1
- item2
- item3
# Inline format
colors: [red, green, blue]🔗 Anchors and Aliases
# Anchor definition
defaults: &defaults
timeout: 30
retries: 3
# Reuse with alias
production:
<<: *defaults
host: prod.com💬 Comments
# This is a comment
key: value # Inline commentTags
#yaml#syntax#reference#documentation