1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#[test] fn test() { // let p = Test { // s: 2, // p: vec![ // None, None,None, Some(Box::new(Test{s: 9, p: vec![None]})), None // ] // }; // let p = ions::to_string(&p).unwrap(); // std::fs::write("tests/test.ion", p).unwrap(); let p = std::fs::read_to_string("tests/test.ion").unwrap(); let p = ions::ion_to_json(&p).unwrap(); println!("{}", p) } use serde::{Deserialize, Serialize}; // #[derive(Serialize, Deserialize, Debug, Default)] // struct Test { // s: i32, // p: Vec<Option<Box<Test>>> // }