Serialize project to json

This commit is contained in:
2025-03-19 20:47:21 +01:00
parent 7a197d9b71
commit d42fe2776c
4 changed files with 17 additions and 5 deletions

View File

@@ -95,7 +95,14 @@ pub(super) fn on_save_project_clicked(tim_manager: MutexTIMManager) -> impl FnMu
project.push(cur_job);
}
Err(Error::from_text(format!("Adding {:?} jobs", project)))
let string = match serde_json::to_string(&project) {
Ok(string) => string,
Err(error) => {
return Err(Error::from_error(error));
}
};
Err(Error::from_text(format!("Adding {} jobs", string)))
}
}