You're almost there. Your code will put the object in body, which is a Vec.
To write the contents of body to a file:
use std::io::Write;
use std::fs::File;
let mut file = File::create("/path/to/my-object").expect("create failed");
file.write_all(&body).expect("failed to write body");