pub async fn write_json_file<T>(path: &Path, data: &T) -> Result<(), Error>where T: Serialize,
Write a JSON file