use crate::r5::parse::all::*;
use ::serde::{Deserialize, Serialize};
#[serde_with::skip_serializing_none]
#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
#[serde(deny_unknown_fields)]
pub struct Identifier {
pub system: String,
pub value: String,
pub r#use: Option<String>,
pub rank: Option<u32>,
pub period: Option<Period>,
}
#[cfg(test)]
mod tests {
use super::*;
type T = Identifier;
#[test]
fn test_serde_json_from_reader() {
let path = crate::r5::parse::all::DIR
.join("contact_point")
.join("contact_point.json");
let file = std::fs::File::open(path).expect("open");
let reader = std::io::BufReader::new(file);
let actual: T = ::serde_json::from_reader(reader).unwrap();
assert_eq!(actual.system, "phone");
}
}