MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / apply_object_hook

Function apply_object_hook

std/json/src/main/parser.rs:159–165  ·  view source on GitHub ↗
(dict: Handle, ctx: &LoadCtx)

Source from the content-addressed store, hash-verified

157}
158
159fn apply_object_hook(dict: Handle, ctx: &LoadCtx) -> Result<Handle> {
160 if let Some(hook) = &ctx.object_hook {
161 hook.call("__call__", &[dict.raw()])
162 } else {
163 Ok(dict)
164 }
165}
166
167fn to_pdk_err(e: JsonError) -> Error {
168 Error::Value(format!("{} at byte {}", e.msg, e.pos))

Callers 1

parse_objectFunction · 0.85

Calls 2

callMethod · 0.45
rawMethod · 0.45

Tested by

no test coverage detected