Crates.io | mlua-json |
lib.rs | mlua-json |
version | 1.0.0 |
source | src |
created_at | 2024-08-11 15:42:06.577761 |
updated_at | 2024-10-29 13:15:53.177679 |
description | A Rust-native implementation of lua-periphery for mlua. |
homepage | https://on-prem.net |
repository | https://gitlab.com/megalithic-llc/mlua-periphery.git |
max_upload_size | |
id | 1333419 |
size | 13,310 |
Rust-native JSON support for mlua.
Add to your Rust project using one of MLua's features: [lua51, lua52, lua53, lua54, luajit, luajit52].
$ cargo add mlua-json --features luajit
use mlua::Lua;
let lua = Lua::new();
mlua_json::preload(&lua);
let script = r#"
local json = require('json')
local table = json.decode('{"abc":123,"def":true}')
local s = json.encode(table)
"#;
$ make check