MCPcopy Create free account
hub / github.com/awslabs/llrt / json_parse_string

Function json_parse_string

libs/llrt_json/src/parse.rs:8–11  ·  view source on GitHub ↗
(ctx: Ctx<'js>, bytes: ObjectBytes<'js>)

Source from the content-addressed store, hash-verified

6use simd_json::{Node, StaticNode};
7
8pub fn json_parse_string<'js>(ctx: Ctx<'js>, bytes: ObjectBytes<'js>) -> Result<Value<'js>> {
9 let bytes = bytes.as_bytes(&ctx)?;
10 json_parse(&ctx, bytes)
11}
12
13pub fn json_parse<'js, T: Into<Vec<u8>>>(ctx: &Ctx<'js>, json: T) -> Result<Value<'js>> {
14 let mut json: Vec<u8> = json.into();

Callers

nothing calls this directly

Calls 2

json_parseFunction · 0.85
as_bytesMethod · 0.45

Tested by

no test coverage detected