What is YAML
YAML is a data serialisation language.It stands for “YAML Ain’t Markup Language”.
The file extensions are: .yaml and .yml, you can use any of the two.
Why you should learn YAML?
It’s very intuitive and human readable compared to other serialization languages.
YAML is a superset of JSON, any valid JSON file is also a valid YAML file.
Uses
YAMLs are used in Docker Compose files, Ansible, Kubernetes and in many tools.
Syntax
As can be seen, syntax are composed of key-value pairs, lists . Comments can also be done using #.
Multiline strings can also be implemented using ‘ | ’ or ‘>’ symbols. |
Multiple YAML documents can also be implemented using ‘—’ symbol in between them.