The core component of the library is the meiose::variant, a tagged union
container supporting the types of the MessagePack specification.
Use the read and write functions of the msgpack and json sub-namespaces
to read and write from and to std::{i,o}stream, respectively.
meiose does not support streamed/partial reading or writing of values, it can only read them or write them all at once.
Multiple build system files are available for easy integration of the library among other codebases. By default, all build system compiles meiose statically
- CMake: this is the main supported build system.
Exports the following library names:
meiose-staticifMEIOSE_BUILD_STATICis true (default).meioseisMEIOSE_BUILD_SHAREDis true.
- Meson: defines the following dependency variables:
meiose_staticif optionstaticis true (default).meioseif optionsharedis true.
- QMake: always builds a
meioselibrary. Static by default, unlessmeiose-sharedCONFIGis set.
| MsgPack type | C++ type |
|---|---|
| Integer | int64_t |
| Nil | nullptr_t |
| Boolean | bool |
| Float | double |
| String | std::string |
| Binary | std::vector<uint8_t> |
| Array | std::vector<meiose::variant> |
| Map | std::map<meiose::variant, meiose::variant> |
| Extension | std::pair<int8_t, std::vector<uint8_t>> |