Skip to content
umangag07 edited this page Feb 7, 2022 · 6 revisions

So what does yaml mean?

  1. It is a data serialization language that is used for writing configuration files.
  2. It stand for yaml ain't markup language, earlier it was called yet another markup language.
  3. So yaml is not for documents but it is for data means it is not for markup language used for document markup, data is stored in the yaml file by which applications can read .

It's Syntax

  1. Yaml has features that comes from other programming languages like Html, Xml, C, etc. And it is a superset of JSON, so JSON files are valid in yaml.
  2. Key-value pairs are stored in the yaml and every key must be unique and it is case-sensitive.
  3. Yaml uses python style indentation.
  4. Each key-value pair that is child of the parent key value pair must be indented with 2spaces and note tab is not used in the yaml.
  5. The structure of yaml file is map or list.
  6. map in yaml needs to be resolved before creating a new one and it could be created by resolving the previous map or increasing the indentation.
  7. List is yaml start with dash(-) and space.

It's uses

  1. It is used for installing packages on servers, writing configuration.
  2. Used by orchestration tools like Kubernetes and deployment tools like Ansible for the configuration, for logs, caches.

It's advantages

  1. It is in human-readable format, can be interoperated with JSON file means JSON can be parsed by yaml compiler as we know yaml is superset of JSON. so choosing yaml is beneficial as both Yaml and JSON could be parsed.
  2. There are no delimiter, so it is light weight than JSON or XMl.
Clone this wiki locally