Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 768 Bytes

YAML.md

File metadata and controls

47 lines (35 loc) · 768 Bytes

YAML

A YAML file is use to represent data. In this case configuration data.

Yaml is define as key value pair seperated by colon with a white space in between value and colon.

Key value pair

  Fruit: Mango
  Liquid: Wine
  Meat: Chicken
  Vegetable: Ginger

In above example keys are Fruit, Liquid, Meat & Vegetable and values are Mango, Wine, Chicken, Ginger.

Array/Lists

  Games:
    - Soccor
    - Tennis
    - Basket Ball
  Vegetables:
    - Ginger
    - Tomato
    - Onion

The dash indicates that it's an element of an array.

Dictionary/Map

  Person1:
    Name: Tom
    Age: 25
    Gender: male
  Person2:
    Name: Ram
    Age: 29
    Gender: male

A dictionary is a set of properties grouped together under an item.