pub fn save_document(path: &Path, doc: &PersistedDocument) -> Result<()>
Save a document to a JSON file.