Conversion Guide1 min
YAML to JSON Conversion Guide
How to convert YAML to JSON
YAML to JSON Conversion Guide
Key points for converting YAML to JSON.
📝 Basic Conversion
Input (YAML)
name: YAMLforge
version: 1.0.0
features:
- anchor preservation
- comment retentionOutput (JSON)
{
"name": "YAMLforge",
"version": "1.0.0",
"features": [
"anchor preservation",
"comment retention"
]
}📊 Type Conversion Rules
| YAML | JSON |
|---|---|
| true, True, yes, on | true |
| false, False, no, off | false |
| null, ~, (empty) | null |
| 123 | 123 |
| 1.5 | 1.5 |
| "text" | "text" |
⚠️ Notes
- Comments: JSON doesn't support comments; use "Preserve Comments" option
- Multiline text: Properly escaped
- Dates: Output as strings
Tags
#yaml#json#conversion#guide