GUIDE深度 · Deep dive

Practical YAML Subset

Most configs use a small part of YAML: key: value, - lists, two-space indentation, strings/numbers/booleans. That is enough to read most CI and Kubernetes configs.

更新 2026-11-01 · 公式可核验

Basic structure

Objects: key: value, with nesting by indentation.

Arrays: - item, which can contain objects.

Scalars: strings, numbers, booleans and null.

Quotes

Quote strings containing colons, hashes or special characters.

Double single quotes inside single-quoted strings; double quotes support escapes.

FAQ

How many spaces?

Two spaces is most common; stay consistent within a file.

Can I write comments?

Yes, but they are lost when converting to JSON.

Sources

Related calculators

YAML to JSONConvert practical YAML (objects, arrays, scalars) to JSON locally.

More guides

Common YAML Parse ErrorsRead guide
KEEP READING

继续读

按顺序读,或跳到同主题的其他指南。

全部指南 →