DEV Community

Cover image for Introduction to YAML
Sumit Mukharjee
Sumit Mukharjee

Posted on

2 1

Introduction to YAML

Let's start getting info about YAML by firstly knowing its full form.
YAML stands for YAML ain't markup language.
What is YAML?

  • YAML is actually a data format used to exchange data.
  • It is similar to XML and JSON data-type.
  • So, YAML is a simple human-readable language that can be used to represent data.
  • In YAML you can store only data and not commands, unlike other programming languages. Data Serialization and Deserialization Serialization - ** This is actually the process of converting the data objects into complex data structures or streams of bytes. Basically, data objects present in complex data structure into the stream of storage that can be used to transfer data in your physical device. The below image can be helpful to understand this concept: 👇 1643133237799.jpg The above thing happens on JSON too in which we call **API which gets converted to JSON DATA which is more human-readable. 1643133431800.jpg The above image shows how the Serialization process stores data.
  • Objects are basically, code together with some data.
  • Data Objects are converted into a series of bytes which saves the state of an object in a form that is easily transmittable This is known as Serialization. Fields like Big Data, Machine Learning, DevOps, etc. uses this concept Serialization Languages: ** JSON,XML and YAML *De-serialization- * The file which was converted during serialization can be converted back to an object is Deserialization. **Object - > File (Serialization) File - > Object (Deserialization) See how simple could it be😊. Types of Objects YAML stores-
  • Configuration Files of any tools or whatever, some are Kubernetes Config File, Flutter Pubspec YAML file, Docker, etc.
  • Log files, caches, etc. Benefits of YAML
  • Simple and Easy to read.
  • It has a strict syntax(Mistakes aren't allowed like indentation).
  • Easily convertible to JSON, XML.
  • Most languages use YAML.
  • More powerful while representing complex data
  • Various tools are available like parsers.
  • Parsing is easy.

This was it for now, for the next and last article about YAML and it's datatypes click here.
Also available in Hashnode here

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay