You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
468 B
22 lines
468 B
use crate::model::ObjectModel;
|
|
|
|
#[test]
|
|
fn test1() {
|
|
let model = crate::model::ObjectModel {
|
|
id: Default::default(),
|
|
name: "Name".to_string(),
|
|
};
|
|
|
|
println!("{}", serde_json::to_string_pretty(&model).unwrap());
|
|
|
|
let s = r#"
|
|
{
|
|
"name": "Name",
|
|
"parent_tpl_id": null
|
|
}
|
|
"#;
|
|
|
|
let x : ObjectModel = serde_json::from_str(s).unwrap();
|
|
|
|
println!("{}", serde_json::to_string_pretty(&x).unwrap());
|
|
}
|
|
|