mlua-json

Crates.iomlua-json
lib.rsmlua-json
version1.0.0
sourcesrc
created_at2024-08-11 15:42:06.577761
updated_at2024-10-29 13:15:53.177679
descriptionA Rust-native implementation of lua-periphery for mlua.
homepagehttps://on-prem.net
repositoryhttps://gitlab.com/megalithic-llc/mlua-periphery.git
max_upload_size
id1333419
size13,310
David Rauschenbach (drauschenbach)

documentation

README

mlua-json

Rust-native JSON support for mlua.

License Arch Lua

Installing

Add to your Rust project using one of MLua's features: [lua51, lua52, lua53, lua54, luajit, luajit52].

$ cargo add mlua-json --features luajit

Using

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)
"#;

Testing

$ make check
Commit count: 75

cargo fmt