use oci::spec; use std::fs::File; use std::io::Read; use std::path::PathBuf; #[test] fn parse_oci_example() { let mut json_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); json_path.push("tests/data/example.json"); let mut file = File::open(json_path.as_os_str()).unwrap(); let mut data = String::new(); file.read_to_string(&mut data).unwrap(); let p: spec::Spec = serde_json::from_str(data.as_str()).unwrap(); println!("{}", p.version); }