Skip to content
Xiangsong-GuanPublic
forked from knd/luatoml

About

serializer and deserializer for toml in lua :

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

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

> 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 :

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages