Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.27 KB

README.md

File metadata and controls

39 lines (26 loc) · 1.27 KB

luatomlPic

Why TOML?

Think of XML, JSON or YAML, TOML has its own advantages. See https://github.com/mojombo/toml.

To be brief, TOML is readable (like YAML), ease of use (like YAML), fast (like JSON), and can cut straight to the soul of the problem. I prefer to write more easy constructs to serve readability as opposed to short, complicated constructs to save some space and prove smartness:

At scale, the skill level of developers reading/writing/maintaining/testing code is going to be a normal distribution around the mean of "not expert." (link)

Usage

TOML from file

> require "luatoml"
> file = io.open("data.toml", "r")
> content = file:read("*all")
> luaObject = load(content)

Lua Object to TOML

> require "luatoml"
> luaString = dump(luaObject)

Test

TODO: Test against https://github.com/BurntSushi/toml-test.

Small changes for testing.

License

See MIT. Copyright (c) Khanh Dao.