YAML

YAML (Yet Another Markup Language) https://yaml.org/has idea as xml, json on python but more user readable and less tag bloated https://learnxinyminutes.com/docs/yaml/

Don't use Tab characters

# is the comment character and yes it allows comments not as json

It uses:

key: value

For the values it is not necessary to use " characters for strings, hex values can be inserted as 0x

It can be nested

nested_keys:
  key1: value
  key2: value

Keys can have multiple values

key:
  - Item 1
  - Item 2

Note

Numbers looking strings might get interpreted as numbers. To avoid that all values can be quoted to be strings but a data type definition can be added to indicate that some are not strings:

"my_key":  !!int "23" 

https://www.yamllint.com/ to check the syntax

https://www.bairesdev.com/tools/json2yaml/ to convert json in yaml


Linurs startpage