DevilKing's blog

冷灯看剑,剑上几分功名?炉香无需计苍生,纵一穿烟逝,万丈云埋,孤阳还照古陵

0%

Yaml Intro

原文链接

can be hard to edit, for large files

It is difficult to see “where” in the file you are because it may be off the screen. You’ll need to scroll up, but then you need to keep track of the indentation, which can be pretty hard even with indentation guides, especially since 2-space indentation is the norm and tab indentation is forbidden2.

主要的几种配置文件格式:

The YAML spec is 23,449 words; for comparison, TOML is 3,339 words, JSON is 1,969 words, and XML is 20,603 words.

一些关于value的类型的解释

1
2
python: 3.5.3
postgres: 9.3

解释成为

{'python': '3.5.3', 'postgres': 9.3}

All of this – and more – is why many experienced YAMLers will often quote all strings, even when it’s not strictly required

不同语言解析上,可能yaml的解析规则上有所不同?

The reason for this is that there are multiple YAML documents in a single file (--- start the document). In Python there is the load_all() function to parse all documents. Ruby’s load() just loads the first document, and as near as I can tell, doesn’t have a way to load multiple documents.

Conclusion

并不是说yaml不好,只是指明yaml不能够更greater

可以尝试更好的方式,such as TOML