其他分享
首页 > 其他分享> > yaml文件 .yml

yaml文件 .yml

作者:互联网

YAML 语法

看看两者之间的转化yml <------>properties

简单键值对:

avg: '0.278 # Batting average'
hr: '65 # Home runs'
rbi: '147 # Runs Batted In'

 

avg=0.278 # Batting average
hr=65 # Home runs
rbi=147 # Runs Batted In

 

数组类型

american:
  - Boston Red Sox
  - Detroit Tigers
  - New York Yankees

american[0]=Boston Red Sox
american[1]=Detroit Tigers
american[2]=New York Yankees

 

集合List<List<String>> languages

languages:
 -
   - Perl
   - Python


languages[0][0]=Perl
languages[0][1]=Python

其实就是languages: [["Perl", "Python"]]

标签:languages,文件,Python,空格,yaml,键值,York,Tab,yml
来源: https://www.cnblogs.com/Lambquan/p/12088663.html