Crate json2lua

Source
Expand description

§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

Functions§

parse
Parse JSON string into a Lua table