A Beginner's Guide To YAML

KIRTI KAMALKIRTI KAMAL
2 min read

What is YAML?

First of all, let us know what is YAML, When we listen this word many folks will think that this is a programming language stuff, but in reality, It's not a programming language, instead, it's a data format used to exchange data just like JSON and XML are used.

YAML stands for Yet Another Markup Language. But now, we call it YAML Ain't Markup Language.

It is basically a simple human-readable language that can be used to represent data and also used to store some information about configurations.

In YAML we can only store data and not commands.

What is Data Serialisation?

Data serialization is a process of converting these data objects which is a combination of code and data into a stream of bytes that can be used to transfer this data on your physical devices.

We basically use YAML, JSON, and XML for data serialization.

Deserialization

It is the reverse of data serialization

Why YAML is not known as the markup language? Why did its full form got changed?

The answer is very simple markup languages are used to store only documents, But in YAML we can store object data along with documents. That's why it is now known as YAML ain't markup language.

What are the Benefits of YAML?

  • It is very simple and easy to read.

  • It can be easily convertible to JSON and XML files.

  • It is more powerful when representing complex data.

Datatypes in YAML

String variables:

myself : kirti
fruit : "apple"
job : 'swe'

Integer, Float, Bool:

rollnumber : 11
marks : 86.6
booleanV : No(false)
booleanV : Yes(true)

Comments in YAML

  • In YAML '#' is used to create comments

  • It doesn't support multiline comments

#kirti kamal
#kirtikamal.tech

Lists in YAML

There are multiple ways to create lists in YAML. Some are given below

-apple
-mango
-orange
cities : [newdelhi , mumbai , bhubaneswar]

Conclusion

Thank you for taking the time to read my blog! I hope you found the information about YAML valuable and insightful. Your interest and support mean a lot to me. If you have any further questions or topics you'd like me to cover in the future, please feel free to reach out. Stay connected and stay curious!

Connect With Me ๐Ÿ‘‹

Portfolio

Twitter

LinkedIn

1
Subscribe to my newsletter

Read articles from KIRTI KAMAL directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

KIRTI KAMAL
KIRTI KAMAL

Kirti Kamal is a tech enthusiast and visionary community leader who is pursuing a Bachelor of Technology in Computer Science and Engineering at Trident Academy of Technology. As a Beta Microsoft Learn Student Ambassador, Kirti helps fellow students learn new technologies and develop their career skills for the future. Kirti also leads the Trident ACM Student Chapter and the Trident Hackathon Club, organizing engaging workshops, events, and hackathons for the tech community. With a strong dedication to open-source, Kirti has established an inclusive platform to guide newcomers through their tech journey. Kirti has also acquired multiple certifications and skills in DevOps, Networking, Linux, Docker, and Frontend Development, demonstrating technical expertise and a passion for continuous learning. Kirti strives to inspire others to explore, innovate, and excel in the ever-evolving realm of technology, by blending leadership skills, collaboration, and creativity.