3 unstable releases

0.1.3 Jun 29, 2025
0.1.2 Dec 24, 2023
0.1.1 Dec 24, 2023
0.1.0 Dec 24, 2023
0.0.0 Dec 24, 2023

#1695 in Parser implementations

Download history 21/week @ 2025-10-03 5/week @ 2025-10-10 14/week @ 2025-10-17 7/week @ 2025-10-24 63/week @ 2025-10-31 2/week @ 2025-11-21 37/week @ 2025-11-28 12/week @ 2025-12-05 54/week @ 2025-12-26 8/week @ 2026-01-02

62 downloads per month
Used in rxdc

Apache-2.0

8KB
166 lines

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


json2lua

Convert JSON to Lua table

Version badge Downloads badge License badge Docs 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,
// }

Dependencies

~1.3–2.4MB
~47K SLoC