pub fn to_vec<M>(msg: &M) -> Result<Vec<u8>, JsonError>where M: SbpMessage + Serialize,
Serialize the given message as a JSON byte vector.