Crates.io | qt-json-rs |
lib.rs | qt-json-rs |
version | 1.0.1 |
source | src |
created_at | 2021-11-21 17:37:07.651293 |
updated_at | 2021-11-21 18:16:13.428368 |
description | JSON library for QT |
homepage | https://github.com/thedome/qt-json-rs |
repository | https://github.com/thedome/qt-json-rs |
max_upload_size | |
id | 485375 |
size | 31,374 |
A simple parser for the Internal Qt Binary JSON data format.
This parser will transform the popular QTBinary JSON format into usable format for rust applications.
Simply provide a binary encoded JSON Array to the function and it will parse it into an internal JSON structure:
use qt_json_rs::QJSONDocument;
fn main(){
let json_data = b"qbjs\
\x01\x00\x00\x00\
\x10\x00\x00\x00\
\x02\x00\x00\x00\
\x0C\x00\x00\x00\
\x4A\x01\x00\x00";
let document = QJSONDocument::from_binary(json_data.to_vec()).unwrap();
println!("{:?}", document);
}
This library has been created by looking at the Qt source code and performing reverse engineering. There is a possibility that the code will not work with other Version of Qt JSON documents. Any help with this library is welcome.