2 releases

0.2.1 Aug 6, 2020
0.2.0 Aug 6, 2020

#128 in #scripting

32 downloads per month
Used in stk-http

MIT/Apache

230KB
5.5K SLoC

Build Status

stk-json

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

Usage

Add the following to your Cargo.toml:

stk = "0.2"
stk-json = "0.2"

Install it into your context:

let mut context = stk::Context::with_default_packages()?;
context.install(stk_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:

stk = "0.2"
stk-json = "0.2"

Install it into your context:

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

Use it in Rune:

use json;

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

Dependencies

~2.8–4MB
~91K SLoC