I have created a library (single NVGT include) which is a fully-featured serializer and deserializer for the MessagePack binary format for data interchange. The inherent structure of msgpack is similar to that of JSON, that it stores structures as arrays and mappings (JSON calls them objects) and scalar values in nil, booleans, integer and floating point numbers, text and binary strings, and an extension type for application-specific payloads. Msgpack is a streaming format, meaning you can decode values as they come in from, say, a network stream, and any valid msgpack encodings can be chained to make a larger stream. Other languages have implementations of this format as well, my reference for interchange was the Python one, msgpack on pip. Examples where this could be used is for local data storage, think save files or binary config files, or a wire format to be sent over the network to communicate between client and server, rather than JSON or simpler delimited strings. It is smaller and faster than JSON, but if human editability or communication with REST APIs is needed JSON should still be used, as I'm not aware of any REST API that communicates in msgpack.
The library can be found here: GitHub - ultrasound1372/nvgt-msgpack: A fully-featured MessagePack serialization and deserialization library in NVGT
Issues and pull requests are welcome! If you have any questions, ask here or the NVGT discord.
4 Likes