mirror of
https://github.com/romixlab/qmsgpack.git
synced 2025-08-01 11:24:26 +02:00
Update README.md
This commit is contained in:
12
README.md
12
README.md
@@ -6,12 +6,12 @@ MessagePack for Qt
|
||||
Installation
|
||||
------------
|
||||
Clone repository:
|
||||
~~~
|
||||
~~~bash
|
||||
git clone https://github.com/romixlab/msgpack-qt.git
|
||||
~~~
|
||||
|
||||
Run cmake:
|
||||
~~~
|
||||
~~~bash
|
||||
cd msgpack-qt
|
||||
mkdir build
|
||||
cd build
|
||||
@@ -19,26 +19,26 @@ cmake ..
|
||||
~~~
|
||||
|
||||
Compile:
|
||||
~~~
|
||||
~~~bash
|
||||
make
|
||||
~~~
|
||||
|
||||
Run tests and install
|
||||
~~~
|
||||
~~~bash
|
||||
make tests install
|
||||
~~~
|
||||
|
||||
Sample usage
|
||||
------------
|
||||
Packing
|
||||
~~~
|
||||
~~~cpp
|
||||
QVariantList list;
|
||||
list << 1 << 2 << 3;
|
||||
QByteArray array = MsgPack::pack(list);
|
||||
~~~
|
||||
|
||||
Unpacking:
|
||||
~~~
|
||||
~~~cpp
|
||||
QVariantList unpacked = MsgPack::unpack(array).toList();
|
||||
~~~
|
||||
|
||||
|
Reference in New Issue
Block a user