The same six types under four syntaxes
JSON, YAML, and TOML all parse into the same logical data model: strings, numbers, booleans, null, lists, maps. Markdown is a different beast — a document format with rich-text rendering — but it carries structured data through front matter, which uses one of the other three. Once you see this, the four feel like dialects of one language.
Quick comparison — same data, four forms
Below: the same record (Pippa-the-vessel) in all four. Notice that JSON gives the most punctuation per byte, YAML the least, TOML lands in the middle, and Markdown wraps a body around the structured front matter.
What each is best at
- Markdown — human-authored prose with light structured metadata. READMEs, blog posts, docs, journals.
- JSON — machine interchange. APIs, logs, message queues, package manifests.
- YAML — human-authored config with deep nesting. Kubernetes, CI, Ansible.
- TOML — human-authored config with shallow nesting and clear semantics. Python/Rust manifests, static-site generators.
Principle: the format is a UX choice, not a capability choice. A modern parser exists for every combination. Pick by 'who edits this most often, with what tooling.' Lean on conversion utilities (next lesson) when the wire format and the disk format need to differ.