mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2025-12-31 08:50:44 +00:00
added json parsing
This commit is contained in:
17
tests/ffprobe_media_tests.rs
Normal file
17
tests/ffprobe_media_tests.rs
Normal 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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user