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

Function response_encode_json

nodedb/src/control/server/native/codec.rs:170–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168
169 #[test]
170 fn response_encode_json() {
171 let resp = NativeResponse::ok(1);
172 let bytes = encode_response(&resp, FrameFormat::Json).unwrap();
173 let s = String::from_utf8(bytes).unwrap();
174 assert!(s.contains("\"seq\":1"));
175 }
176
177 #[test]
178 fn response_encode_msgpack() {

Callers

nothing calls this directly

Calls 2

encode_responseFunction · 0.70
okFunction · 0.50

Tested by

no test coverage detected