Encode a serde_json::Value payload as MessagePack bytes.
(value: &serde_json::Value)
| 18 | |
| 19 | /// Encode a serde_json::Value payload as MessagePack bytes. |
| 20 | pub(in crate::data::executor) fn encode_json(value: &serde_json::Value) -> crate::Result<Vec<u8>> { |
| 21 | nodedb_types::json_to_msgpack(value).map_err(|e| crate::Error::Codec { |
| 22 | detail: format!("response serialization: {e}"), |
| 23 | }) |
| 24 | } |
| 25 | |
| 26 | /// Encode any `Serialize` type as MessagePack bytes. |
| 27 | /// |
no test coverage detected