2 releases
| 0.1.1 | Jun 29, 2025 |
|---|---|
| 0.1.0 | Jul 15, 2024 |
#6 in #lua-table
51 downloads per month
8KB
187 lines
yaml2lua
Convert YAML to Lua table
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,NumberandBoolkeys - Tagged values are not supported yet
Dependencies
~1.6–2.5MB
~53K SLoC