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!