Yaml Files
·
Yaml stands for yaml ain't markup language. Markup language- A language that provides child parent relationship . e.g. html.
yaml files
- It is a data format used to exchange files. 2.similar to xml & json type.
- In yaml you can only store data , and not commands.
- data serialization language .
- markup language stores document , and yaml stores data,document,object that is why it ain't a markup language.
- yaml is case sensitive.
Benifits of yaml files.
- Human readable and simple.
- it has a strict syntax , indentation is very important.
- Easily convertible to xml , json .
- most language use yaml files.
- More powerful while representing complex data.
- Parsing is easy.
extension- .yaml or .yml is used. comments - #this is a comment. !!int - this is the way to specify data types in yaml
Data Types in yaml
- strings !!str

- Other data types

Advance Data Types In Yaml
- MAP ( Key value pairs ) !!map

- Sequence (list) !!seq

- pairs (key may have duplicate values) !! pairs

- set ( keys can only have unique values) !!set

- Dictionary !!omap

ANCHORS
To copy paste set of values in different keys we use anchors example:

- --- is used to specify the end of document
- ... is used to indicate end of yaml file
yaml tools you can use.
- to check formatting of yaml document click here
- to convert yaml to json n another formats click here
- few tools that you can check are . lens datree
Thankyou , see you next time Ayush Mishra
更多推荐
所有评论(0)