Skip to main content

json_encode

Function json_encode 

Source
pub fn json_encode(value: &Value) -> Result<Vec<u8>>
Expand description

Encodes a Lua value as JSON under the standard library’s bounds (depth, node count, UTF-8) — the encoder anything outside this crate uses for a script’s value, so deep nesting is an error rather than a stack overflow.

§Errors

A value past the bounds, or one JSON cannot represent.