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