true、0123 的值需加引号,避免被 YAML 误推断类型。TOML to YAML Converter - Paste TOML text and convert it to YAML, including [section] and [[array of tables]]. Free, browser-only.
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Structure mapping | TOML tables map to YAML mappings; arrays to sequences | TOML v1.0.0 / YAML 1.2 |
| Scalar quoting | quote strings that would parse as booleans or numbers | YAML 1.2 |
| Datetimes | emit ISO 8601 timestamp text | RFC 3339 / YAML 1.2 |
| TOML | YAML |
|---|---|
| key = "v" | key: v |
| [sec] | sec: |
| [[arr]] | arr:\n - ... |
| list = [1,2] | list:\n - 1\n - 2 |