Introduction to YAML

Introduction - >

YAML itself is a data serialization language. In simple terms, it is basically a simple human-readable language that can be used to represent data. Previously YAML is known as "Yet Another Markup language". But currently, its full form is - YAML Ain’t markup language.

Why YAML is so popular - >

  • Human readable & intuitive

  • Configuration files are all written in YAML.

  • Widely used format.

  • For different DevOps tools & applications.

What is YAML - >

  • It's a data format used to exchange data.

  • It's a data serialization language Similar to XML & JSON. [ Data serialization - It's basically the process of converting the data object(Code + Data) into a stream of bytes, that can be used to transfer data. ]

1y.png

  • In YAML you can store only data not commands.

[ NOTE:- YAML file extensions are .yaml and .yml ]

YAML Use Cases - >

  • For Docker compose files, Ansible & Kubernetes configuration files & for other DevOps tools.

  • For logs & caches etc.

Benefits of YAML - >

  • It is simple & easy to read.

  • It has a strict syntax - Indentation is important.

  • Easily convertible to XML & JSON files.

  • It is more powerful when representing complex data.

  • You can use various tools with it like parsers etc.

!!!!!For more details into syntax, datatypes, comments, key-value pairs, etc. in YAML check out these two videos & an article for more hands-on experience!!!!!

Resource 1 - > %[youtube.com/watch?v=IA90BTozdow&list=PL..

Resource 2 - > %[youtube.com/watch?v=1uFVr15xDGg&t=43s]

Did you find this article valuable?

Support Pritam Saha by becoming a sponsor. Any amount is appreciated!