Xiangsong-Guan / luatoml

serializer and deserializer for toml in lua :

Home Page:https://github.com/mojombo/toml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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

Lua Object to TOML

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

Test

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

Small changes for testing.

License

See MIT. Copyright (c) Khanh Dao.

About

serializer and deserializer for toml in lua :

https://github.com/mojombo/toml

License:MIT License


Languages

Language:Lua 100.0%