use crate::Result;
use voxj::VoxjSerdeFile;
/// Serializes `file` to pretty-printed `.voxj` JSON bytes with a trailing
/// newline.
pub fn to_voxj_pretty_file_bytes(file: &VoxjSerdeFile) -> Result<Vec<u8>> {
let mut bytes = serde_json::to_vec_pretty(file)?;
bytes.push(b'\n');
Ok(bytes)
}