Quiz: What is the formal relationship between the JSON data format and YAML 1.2?
… specification, JSON is a strict syntactic subset of YAML 1.2 ; every valid JSON document is valid YAML 1.2.
Find tutorials, system documentation, dynamic pages, and interactive quizzes in one place.
… specification, JSON is a strict syntactic subset of YAML 1.2 ; every valid JSON document is valid YAML 1.2.
YAML sequences (lists) use a hyphen followed by at least one space ( - item ) .
The merge key operator ( ) injects all key-value mappings from the referenced anchor into the target dictionary.
YAML supports compact flow sequences using JSON-style square brackets: [ 'item1', 'item2' ] .
Comments in YAML begin with the hash ( # ) character and extend to the end of that line.
YAML represents null values using either the literal null keyword or a solitary tilde ( ~ ).
Three hyphens ( --- ) mark the beginning of a new YAML document within a multi-document file.
YAML key-value mappings compile into an associative array (Python dict , JavaScript Object , Go map ).