parse_empty/
parse_empty.rs1use led_rs::*;
2use std::fs::File;
3use std::io::prelude::*;
4use std::path::PathBuf;
5
6fn parse_file(file_name: &str) {
8 let mut file_path = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
9 file_path.push("examples");
10 file_path.push(file_name);
11 file_path.set_extension("json");
12
13 let mut file = File::open(file_path).unwrap();
14 let mut contents = String::new();
15 file.read_to_string(&mut contents).unwrap();
16
17 println!("{:?}", Project::parse_json(contents).unwrap());
18}
19
20fn main() {
21 parse_file("empty");
22}