Crates.io | yaml2lua |
lib.rs | yaml2lua |
version | |
source | src |
created_at | 2024-07-15 14:23:03.705597 |
updated_at | 2024-07-15 14:23:03.705597 |
description | Convert YAML to Lua table |
homepage | |
repository | https://github.com/DervexHero/yaml2lua |
max_upload_size | |
id | 1303906 |
size | 0 |
Convert YAML to Lua table
use yaml2lua::parse;
let yaml = r#"
string: yaml2lua
int: 420
bool: true
nil: null
"#;
let lua = parse(yaml).unwrap();
// Output:
// {
// ["string"] = "yaml2lua",
// ["int"] = 420,
// ["bool"] = true,
// ["nil"] = nil,
// }