From 37f677e1dc1b28b03e900ff86794303c56257cda Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Sun, 23 Oct 2022 19:03:39 +0100 Subject: [PATCH] Fix struct serialization names. --- src/structs.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/structs.rs b/src/structs.rs index 407b31e..b013e83 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -3,25 +3,24 @@ use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize)] pub struct Sponsor { pub hash: String, - #[serde(rename = "video_id")] + #[serde(rename = "videoID")] pub video_id: String, pub segments: Vec, } - #[derive(Serialize, Deserialize)] pub struct Segment { - #[serde(rename = "uuid")] + #[serde(rename = "UUID")] pub uuid: String, - #[serde(rename = "action_type")] + #[serde(rename = "actionType")] pub action_type: String, pub category: String, pub description: String, pub locked: i32, pub segment: Vec, - #[serde(rename = "user_id")] + #[serde(rename = "userID")] pub user_id: String, - #[serde(rename = "video_duration")] + #[serde(rename = "videoDuration")] pub video_duration: f32, pub votes: i32, }