yaml file

  1.   Why Need Yaml File 

desinged to be clean and easy to be read   .yml or .yaml 

2 example 

person:

name: mike
occupation: programmer
age: 29
gpa: !!str 3.5 # convert to string !!
fav_num: 1e+10
male: true
birthday: 1989-04-06 11:10:00
flaws: null
hobbies:
- football
- music
football: ["lfc","bfc"] # list
friends:
- name: "steph"
age: 22
- {name: "adam",age: 22}
description: > # donot preserve format
test1
test2
test3
signature: | # | preserve format
test4
test5
name: &refpoint  
id: *refpoint    #  refer to another value , and give the value to id 

猜你喜欢

转载自www.cnblogs.com/anyu686/p/9038635.html