pub fn to_vec<T>(value: &T) -> Result<Vec<u8>>where T: ?Sized + Serialize,
Serialize the given data structure as a JSON byte vector.