Skip to content


"JSON (JavaScript Object Notation) is a lightweight data-interchange format." -

See also

  • toml: "TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics."
  • yaml: Better human readability, more options.

Is YAML a superset of JSON?

Many people say that JSON is a subset of YAML, but that is not strictly true. See

Here's an example of json that does not work as yaml:

$ sed 's/\t/--->/g' break-yaml.json
--->--->"list": [
$ jq -c . break-yaml.json
$ break-yaml.json
- {}
- {}
$ break-yaml.json
ERROR: break-yaml.json could not be parsed
while scanning for the next token
found character '\t' that cannot start any token
in "break-yaml.json", line 1, column 1
$ sed 's/\t/    /g' break-yaml.json |
{"list": [{}, {}]}