qt-json

Crates.ioqt-json
lib.rsqt-json
version1.0.2
sourcesrc
created_at2021-11-28 18:44:25.782013
updated_at2021-11-28 18:44:25.782013
descriptionJSON library for QT
homepagehttps://github.com/thedome/qt-json-rs
repositoryhttps://github.com/thedome/qt-json-rs
max_upload_size
id488919
size28,154
Dominic Heun (TheDome)

documentation

README

qt-json

codecov crates.io

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.

Use

Simply provide a binary encoded JSON Array to the function and it will parse it into an internal JSON structure:

use qt_json::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);
}

Disclaimer

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.

License: BSD-3-Clause

Commit count: 74

cargo fmt