MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / extract_nested_path

Function extract_nested_path

nodedb-query/src/msgpack_scan/field.rs:134–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133 #[test]
134 fn extract_nested_path() {
135 let buf = encode(&json!({"address": {"city": "tokyo"}}));
136 let (start, _end) = extract_path(&buf, 0, &["address", "city"]).unwrap();
137 assert_eq!(read_str(&buf, start), Some("tokyo"));
138 }
139
140 #[test]
141 fn extract_dot_path_works() {

Callers

nothing calls this directly

Calls 2

extract_pathFunction · 0.85
encodeFunction · 0.70

Tested by

no test coverage detected