-
Notifications
You must be signed in to change notification settings - Fork 0
Yaml
umangag07 edited this page Feb 7, 2022
·
6 revisions
- It is a data serialization language that is used for writing configuration files.
- It stand for
yaml ain't markup language, earlier it was calledyet another markup language. - 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 .
- 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.
- Key-value pairs are stored in the yaml and every key must be unique and it is
case-sensitive. - Yaml uses python style indentation.
- Each key-value pair that is child of the parent key value pair must be indented with
2spacesand notetabis not used in the yaml. - The structure of yaml file is map or list.
- 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.
- List is yaml start with dash(-) and space.
- It is used for installing packages on servers, writing configuration.
- Used by orchestration tools like Kubernetes and deployment tools like Ansible for the configuration, for logs, caches.
- 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.
- There are no delimiter, so it is light weight than JSON or XMl.