Skip to content

knd/luatoml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

serializer and deserializer for toml in lua :

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages