Skip to content
forked from knd/luatoml

serializer and deserializer for toml in lua :

License

Notifications You must be signed in to change notification settings

Xiangsong-Guan/luatoml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 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

> 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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%