zoukankan      html  css  js  c++  java
  • 什么是TOML?

    配置文件的使用由来已久,从.ini、XML、JSON、YAML再到TOML,语言的表达能力越来越强,同时书写便捷性也在不断提升。 TOML是前GitHub CEO, Tom Preston-Werner,于2013年创建的语言,其目标是成为一个小规模的易于使用的语义化配置文件格式。TOML被设计为可以无二义性的转换为一个哈希表(Hash table)。


    Comparison with Other Formats

    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.

    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.html

    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.


    参考资料

    toml-lang/toml: Tom's Obvious, Minimal Language
    https://github.com/toml-lang/toml

    TOML简介 (转) - 孤独信徒 - 博客园
    https://www.cnblogs.com/unqiang/p/6399136.html

    深入对比TOML,JSON和YAML - sunsky303 - 博客园
    https://www.cnblogs.com/sunsky303/p/9208848.html

    TOML: GitHub 这是要革 YAML 的命呀! - SegmentFault 业界资讯 - SegmentFault 思否
    https://segmentfault.com/a/1190000000477752

  • 相关阅读:
    javascript --学习this
    seaJS
    wamp之htaccess的配置
    replace之$1、$2等
    nw.js使用
    新电脑开发环境配置
    vue-vue常用指令
    Array的splice与slice
    vue-入门体验
    Object.defineProperty
  • 原文地址:https://www.cnblogs.com/wzwyc/p/10676455.html
Copyright © 2011-2022 走看看