|
Lite³
A JSON-Compatible Zero-Copy Serialization Format
|
Building Messages - Reading Messages - Strings - Nesting - Arrays - Iterators - JSON Conversion
This section contains various how-to guides on using essential library functions. Every topic is accompanied by an example code file inside the Lite³ repository, with separate directories for each API:
examples/buffer_api/*examples/context_api/*To build the examples, inside the project root run:
To run an example:
All how-to guides will explain topics using the Context API, though the concepts explained are equally valid for the Buffer API, the only difference being that library functions for the latter take manual buffers parameters instead of opaque *ctx pointers. For those wishing to use the buffer API, it is recommended to study the code examples of the buffer API while reading the guides.
By default, library error messages are disabled. However it is recommended to enable them to receive feedback during development. To do this, either:
// #define LITE3_ERROR_MESSAGES inside the header file: include/lite3.h-DLITE3_ERROR_MESSAGESIf you installed using pkg-config, you may need to reinstall the library to apply the changes. To do this, run: