Crates.io | json2lua |
lib.rs | json2lua |
version | 0.1.2 |
source | src |
created_at | 2023-12-24 14:34:59.891836 |
updated_at | 2023-12-24 21:34:43.584582 |
description | Convert JSON to Lua table |
homepage | |
repository | https://github.com/DervexHero/json2lua |
max_upload_size | |
id | 1079721 |
size | 17,305 |
Convert JSON to Lua table
use json2lua::parse;
let json = r#"{
"string": "abc",
"int": 123,
"bool": true,
"null": null
}"#;
let lua = parse(json).unwrap();
// Output:
// {
// ["string"] = "abc",
// ["int"] = 123,
// ["bool"] = true,
// ["null"] = nil,
// }