Choose for the people editing it
JSON has a small grammar and predictable parsers. YAML is easier to scan in large configuration files but includes more syntax and type inference rules.
Where JSON fits best
JSON is a strong default for APIs, generated artifacts, package metadata and data exchanged across languages.
- Universal parser support
- Unambiguous braces and brackets
- Straightforward schema validation
- Reliable round trips
Where YAML fits best
YAML works well for configuration maintained by people: deployment manifests, automation workflows and settings with long block strings. Quote values that could be interpreted as dates or booleans, and validate after conversion.
Read the specification
Put the guide into practice
Open the related browser tools and test the workflow with a synthetic sample