What is YAML?
A human-readable data serialization format that uses indentation rather than braces, popular for configuration files (CI pipelines, Kubernetes manifests, OpenAPI specs).
YAML was originally an acronym for "Yet Another Markup Language" and later a backronym for "YAML Ain't Markup Language", which says something about how the format thinks of itself. It is a superset of JSON: every valid JSON document is also valid YAML, but YAML adds anchors, aliases, multi-line strings, and a forgiving syntax that drops braces in favor of indentation.
YAML wins where humans edit the file directly: docker-compose, Kubernetes manifests, GitHub Actions workflows, OpenAPI specs, Ansible playbooks. Writing nested config in YAML is roughly half the keystrokes of writing it in JSON, which matters when an engineer is editing it daily.
The catch is that YAML is also notoriously easy to subtly break. Tabs vs spaces, the "Norway problem" (the country code NO parsed as boolean false), and surprise type coercion of unquoted strings all bite. Modern parsers (YAML 1.2, libyaml, ruamel.yaml) tighten most of this, but defensive YAML still means quoting strings and being explicit about types.
In the wild
- A GitHub Actions workflow file driving CI from
.github/workflows/test.yml - A Kubernetes Deployment manifest declaring replicas and container image
- An OpenAPI spec written in YAML for legibility and converted to JSON at build time