logo

YAML for Readable, Human-Friendly Configuration Files

YAML (YAML Ain’t Markup Language) is a format that allows for data to be serialised in an easily readable manner and it is easy to understand for those who use it. The main purpose of YAML is to facilitate usage of configuration files and to send data over the Internet. Unlike other formats like XML or JSON, it uses indentation (tabbing) instead of using tags or brackets to indicate hierarchy within the data being sent. This makes it simple for humans to read and modify. Within YAML, you have support for key-value pairs, lists, nested objects, and complex data types. 

Therefore, it can be used as a representation for workflow configurations, application configuration settings, and structured data with very little excess syntax noise. In fact, it has been widely adopted within the DevOps Tooling Ecosystem, CI/CD APIs and Pipelines, Kubernetes Manifests, Cloud Configurations and Automation Frameworks such as Ansible. Additionally, the possibility of creating aliases and anchors enables YAML values to reference other YAML values, which will increase the maintainability of the YAML and decrease redundancy. 

Altogether, even though reading YAML is easy, a strict standard of indenting and formatting is essential for parsing (i.e., the way the YAML is read in and converted to a format usable by an application) purposes. Hence, because YAML is highly expressive and clean in its structure compared to other formats used to define infrastructure and applications, it has become one of the most popular formats for defining configurations where readability and maintainability are paramount.

Software Development