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