YAML compared to XML
YAML is less verbose than XML; however, YAML is meant just for data and is not technically a markup language (YAML A‘int Markup Language).
YAML is less verbose than XML; however, YAML is meant just for data and is not technically a markup language (YAML A‘int Markup Language).
Try putting spaces after the colons.
Change to The space after the colon is mandatory in yaml if you want a key-value pair. (See http://www.yaml.org/spec/1.2/spec.html#id2759963)
File extensions do not have any bearing or impact on the content of the file. You can hold YAML content in files with any extension: .yml, .yaml or indeed anything else. The (rather sparse) YAML FAQ recommends that you use .yaml in preference to .yml, but for historic reasons many Windows programmers are still scared of using extensions with more than three characters … Read more
You could try the search feature in pip, which looks for packages in PyPI with yaml in the short description. That reveals various packages, including PyYaml, yamltools, and PySyck, among others (Note that PySyck docs recommend using PyYaml, since syck is out of date). Now you know a specific package name, you can install it: If you … Read more
TL;DR You want this: Mappings The YAML equivalent of a JSON object is a mapping, which looks like these: Note that the first characters of the keys in a block mapping must be in the same column. To demonstrate: Sequences The equivalent of a JSON array in YAML is a sequence, which looks like either … Read more
This is valid YAML: Note, that every ‘-‘ starts new element in the sequence. Also, indentation of keys in the map should be exactly same.
You cannot have a multiline plain scalar, such as your include:false transitions be the key to a mapping, that is why you get the mapping values not allowed in this context error. Either you forgot that you have to have a space after the value indicator (:), and you meant to do: or you need to quote … Read more
A YAML sequence is an array. So this is the right way to express it: That’s identical in meaning to: It’s also legal to split a single-line array over several lines: and even have multi-line strings in single-line arrays:
Technically YAML is a superset of JSON. This means that, in theory at least, a YAML parser can understand JSON, but not necessarily the other way around. See the official specs, in the section entitled “YAML: Relation to JSON”. In general, there are certain things I like about YAML that are not available in JSON. As @jdupont … Read more