| Crates.io | json2lua |
| lib.rs | json2lua |
| version | 0.1.3 |
| created_at | 2023-12-24 14:34:59.891836+00 |
| updated_at | 2025-06-29 15:14:38.656147+00 |
| description | Convert JSON to Lua table |
| homepage | |
| repository | https://github.com/DervexHero/json2lua |
| max_upload_size | |
| id | 1079721 |
| size | 21,123 |
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,
// }