2 unstable releases
0.1.2 | Dec 24, 2023 |
---|---|
0.1.1 |
|
0.1.0 |
|
0.0.0 | Dec 24, 2023 |
#2478 in Parser implementations
7KB
136 lines
json2lua
Convert JSON to Lua table
Example:
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,
// }
lib.rs
:
json2lua
Convert JSON to Lua table
Example:
use json2lua::parse;
let json = r#"{
"string": "json2lua",
"int": 420,
"bool": true,
"null": null
}"#;
let lua = parse(json).unwrap();
// Output:
// {
// ["string"] = "json2lua",
// ["int"] = 420,
// ["bool"] = true,
// ["null"] = nil,
// }
Made with <3 by Dervex
Dependencies
~1.2–1.9MB
~35K SLoC