2 unstable releases

0.1.2 Dec 24, 2023
0.1.1 Dec 24, 2023
0.1.0 Dec 24, 2023
0.0.0 Dec 24, 2023

#1096 in Parser implementations

Download history 82/week @ 2023-12-18 32/week @ 2023-12-25 13/week @ 2024-01-01 7/week @ 2024-01-08 6/week @ 2024-01-15 3/week @ 2024-01-22 10/week @ 2024-01-29 3/week @ 2024-02-05 26/week @ 2024-02-12 91/week @ 2024-02-19

130 downloads per month

Apache-2.0

7KB
136 lines

json2lua

Convert JSON to Lua table

Version badge Downloads badge License badge

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–1.7MB
~31K SLoC