use serde::Serialize; pub fn serialize(s: S) -> Vec { let mut buffer: Vec = Vec::new(); serde_json::to_writer(&mut buffer, &s).unwrap(); buffer }