Skip to content

DervexDev/yaml2lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yaml2lua

Convert YAML to Lua table

Version badge Downloads badge License badge Docs badge

Example:

use yaml2lua::parse;

let yaml = r#"
string: yaml2lua
int: 420
bool: true

array:
  - abc
  - 123
"#;

let lua = parse(yaml).unwrap();
// Output:
// {
//   ["string"] = "yaml2lua",
//   ["int"] = 420,
//   ["bool"] = true,
//   ["array"] = {
//      "abc",
//      123,
//   },
// }

Notes

  • Mappings only support String, Number and Bool keys
  • Tagged values are not supported yet

About

Convert YAML to Lua table

Resources

License

Stars

Watchers

Forks

Languages