配置文件的使用由來已久,從.ini、XML、JSON、YAML再到TOML,語言的表達能力愈來愈強,同時書寫便捷性也在不斷提高。 TOML是前GitHub CEO, Tom Preston-Werner,於2013年建立的語言,其目標是成爲一個小規模的易於使用的語義化配置文件格式。TOML被設計爲能夠無二義性的轉換爲一個哈希表(Hash table)。html
In some ways TOML is very similar to JSON: simple, well-specified, and maps easily to ubiquitous data types. JSON is great for serializing data that will mostly be read and written by computer programs. Where TOML differs from JSON is its emphasis on being easy for humans to read and write. Comments are a good example: they serve no purpose when data is being sent from one program to another, but are very helpful in a configuration file that may be edited by hand.git
The YAML format is oriented towards configuration files just like TOML. For many purposes, however, YAML is an overly complex solution. TOML aims for simplicity, a goal which is not apparent in the YAML specification: http://www.yaml.org/spec/1.2/spec.htmlgithub
The INI format is also frequently used for configuration files. The format is not standardized, however, and usually does not handle more than one or two levels of nesting.segmentfault
toml-lang/toml: Tom's Obvious, Minimal Language
https://github.com/toml-lang/tomlapp
TOML簡介 (轉) - 孤獨信徒 - 博客園
http://www.javashuo.com/article/p-tceeddbi-kz.htmlui
深刻對比TOML,JSON和YAML - sunsky303 - 博客園
http://www.javashuo.com/article/p-xqbxnpou-kz.html設計
TOML: GitHub 這是要革 YAML 的命呀! - SegmentFault 業界資訊 - SegmentFault 思否
http://www.javashuo.com/article/p-xpvcybre-h.htmlrest