- A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
- An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
YAML: YAML Ain't Markup Language What It Is: YAML is a human friendly data serialization standard for all programming languages.
The relationship between the two languages is described in section 1.3 of http://www.yaml.org/spec/1.2/spec.html.
Both JSON and YAML aim to be human readable data interchange formats. However, JSON and YAML have different priorities. JSON’s foremost design goal is simplicity and universality. Thus, JSON is trivial to generate and parse, at the cost of reduced human readability. It also uses a lowest common denominator information model, ensuring any JSON data can be easily processed by every modern programming environment.
In contrast, YAML’s foremost design goals are human readability and support for serializing arbitrary native data structures. Thus, YAML allows for extremely readable files, but is more complex to generate and parse. In addition, YAML ventures beyond the lowest common denominator data types, requiring more complex processing when crossing between different programming environments.
An interesting, and slightly humorous, description of JSON and its modern relevance is here:
What to use?
I’m also using yaml.js from js-yaml located here: