// This prints JSON with byte array fields in hex format.
This prints JSON with byte array fields in hex format.
This prints JSON with byte array fields in hex format .
fn to_json_string<T: Serialize>(msg: &T) -> String {
        let mut out = vec![];
        let mut ser = serde_json::Serializer::new(&mut out);
        let ser = serde_bytes_repr::ByteFmtSerializer::hex(&mut ser);
        msg.serialize(ser).expect("Failed to serialize to JSON");
        String::from_utf8(out).expect("UTF8 conversion error")
    }
fn to_json_string < T : Serialize > ( msg : & T ) -> String { let mut out = vec ! [ ] ; let mut ser = serde_json :: Serializer :: new ( & mut out ) ; let ser = serde_bytes_repr :: ByteFmtSerializer :: hex ( & mut ser ) ; msg . serialize ( ser ) . expect ( " " ) ; String :: from_utf8 ( out ) . expect ( " " ) }
This prints JSON with byte array fields in hex format.
This prints JSON with byte array fields in hex format .
msg
&T