openrtb-native1 0.2.0

An implementation of OpenRTB Dynamic Native Ads 1.2 Final.
Documentation
/// 5.6 Video Response Object
///
/// Corresponds to the Video Object in the request, yet containing a value of a conforming VAST tag
/// as a value.
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Clone)]
pub struct Video {
    /// required; string; -
    /// vast xml.
    pub vasttag: String,
}

#[cfg(test)]
mod test {
    use super::*;

    #[test]
    fn json() -> serde_json::Result<()> {
        let json = r#"{"vasttag":""}"#;
        let o1 = Video::default();
        assert_eq!(serde_json::to_string(&o1)?, json);
        assert_eq!(o1, serde_json::from_str::<Video>(json)?);

        Ok(())
    }
}