added json parsing

This commit is contained in:
Jamie Hardt
2020-11-22 18:48:08 -08:00
parent 02a91f2b1d
commit a5c55dbcf1
3 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
extern crate serde_json;
use serde_json::{Result, Value, from_str};
use std::fs::File;
use std::io::Read;
#[test]
fn test_a() {
let mut json_file = File::open("tests/ffprobe_media_results.json").unwrap();
let mut s = String::new();
json_file.read_to_string(&mut s).unwrap();
let v: Value = from_str(&mut s).unwrap();
//println!("file list: {:?}", ffprobe_data);
}