|
Gin
|
Converts between MessagePack binary format and juce::var. More...
#include <gin_messagepack.h>
Static Public Member Functions | |
| static juce::MemoryBlock | toMessagePack (const juce::var &obj) |
| Converts a juce::var to MessagePack binary format. | |
| static juce::var | parse (const juce::MemoryBlock &data) |
| Parses MessagePack binary data into a juce::var. | |
Converts between MessagePack binary format and juce::var.
MessagePack is an efficient binary serialization format that's more compact than JSON. This class provides bidirectional conversion between MessagePack data and JUCE's var type.
Limitations due to juce::var constraints:
Converts a juce::var to MessagePack binary format.
Serializes a var (and any nested structures) into MessagePack binary format. The var can contain primitives, arrays, and objects which will be encoded appropriately.
| obj | The var to serialize |
Parses MessagePack binary data into a juce::var.
Deserializes MessagePack binary data back into a var structure. Arrays become var arrays, objects become DynamicObjects, and primitives are converted to appropriate var types.
| data | The MemoryBlock containing MessagePack-encoded data |