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

Function encode

nodedb-query/src/msgpack_scan/group_key.rs:115–117  ·  view source on GitHub ↗
(v: &serde_json::Value)

Source from the content-addressed store, hash-verified

113 use serde_json::json;
114
115 fn encode(v: &serde_json::Value) -> Vec<u8> {
116 nodedb_types::json_msgpack::json_to_msgpack(v).expect("encode")
117 }
118
119 #[test]
120 fn single_string_field() {

Callers 7

single_string_fieldFunction · 0.70
single_int_fieldFunction · 0.70
multiple_fieldsFunction · 0.70
missing_field_is_nullFunction · 0.70
empty_group_fieldsFunction · 0.70
null_field_valueFunction · 0.70
float_fieldFunction · 0.70

Calls 2

json_to_msgpackFunction · 0.50
expectMethod · 0.45

Tested by 7

single_string_fieldFunction · 0.56
single_int_fieldFunction · 0.56
multiple_fieldsFunction · 0.56
missing_field_is_nullFunction · 0.56
empty_group_fieldsFunction · 0.56
null_field_valueFunction · 0.56
float_fieldFunction · 0.56