minimal/minimal.rs
1extern crate env_logger;
2
3use qt_json_rs::QJSONDocument;
4
5fn main() {
6 env_logger::init();
7 let json_data = b"qbjs\
8 \x01\x00\x00\x00\
9 \x10\x00\x00\x00\
10 \x02\x00\x00\x00\
11 \x0C\x00\x00\x00\
12 \x4A\x01\x00\x00";
13
14 let document = QJSONDocument::from_binary(json_data.to_vec()).unwrap();
15
16 // Prints an Array with 10 as value
17 println!("{:?}", document.base);
18}