Module documentation.

Bindings to various serialization libraries.

To use the plugin, add the following in build.settings:

plugins = {
  ["plugin.serialize"] = { publisherId = "com.xibalbastudios" }

A sample project is available here.

A second sample, demonstrating interop with luaproc, may be found here.

struct and lpack come courtesy of two of Lua's own authors. These are both similar in intent; which one to use will largely be a matter of preference. Both pack data into a Lua string and unpack from the same. This allows for structured data to be sent to APIs, e.g. a C library that expects an array of floats or small structures. Memory can be sent directly, rather than destructuring the data into tables, yet more safely than via blind userdata, since strings have a definite length.

marshal encodes and decodes data directly, without the aforementioned libraries' use of an auxiliary data format specifier. This is useful for passing around data when human readability is not a concern (as it is with JSON), say to persist across program runs or to communicate between threads.


lpack Corona binding to lpack, a simple Lua library for packing and unpacking binary data.
marshal Corona binding for lua-marshal: fast table serialization for Lua.
struct Corona binding to struct, a library offering basic facilities to convert Lua values to and from C structs.
generated by LDoc 1.4.0