a small relational database with user-editable schema for manual data entry
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.
 
 
 
 
 
 
yopa/yopa/src/tests.rs

23 lines
489 B

use crate::model::ObjectModel;
#[test]
fn test1() {
let model = crate::model::ObjectModel {
id: Default::default(),
name: "Name".to_string(),
parent: None
};
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());
}