#language #scripting

runestick-json

An JSON module based on serde_json for runestick

2 unstable releases

0.3.0 Sep 2, 2020
0.2.2 Aug 7, 2020

#121 in #scripting

31 downloads per month
Used in runestick-http

MIT/Apache

685KB
16K SLoC

Build Status

runestick-json

The json package, providing access to functions to serialize and deserialize json.

Usage

Add the following to your Cargo.toml:

runestick = "0.2"
runestick-json = "0.2"

Install it into your context:

let mut context = runestick::Context::with_default_packages()?;
context.install(runestick_json::module()?)?;

Use it in Rune:

use json;

fn main() {
    let data = json::from_string("{\"key\": 42}");
    dbg(data);
}

lib.rs:

The json package, providing access to functions to serialize and deserialize json.

Usage

Add the following to your Cargo.toml:

runestick = "0.2"
runestick-json = "0.2"

Install it into your context:

# fn main() -> runestick::Result<()> {
let mut context = runestick::Context::with_default_packages()?;
context.install(&runestick_json::module()?)?;
# Ok(())
# }

Use it in Rune:

use json;

fn main() {
    let data = json::from_string("{\"key\": 42}");
    dbg(data);
}

Dependencies

~2.3–3MB
~63K SLoC