pub fn encode_compact<T: Serialize>(value: &T) -> Result<Vec<u8>, ProtocolError>
Encodes an already validated protocol document as compact JSON.