How do I unpack and extract data properly using msgpack-c?
问题 I'm currently trying to use msgpack in a project written in C. I'm using msgpack for the purpose of serializing the contents of a struct, which is then to be sent over the network, and deserialized back into a corresponding struct on the other side. Condensed version of what I'm trying to do: #include <stdio.h> #include <msgpack.h> #include <stdbool.h> typedef someStruct{ uint32_t a; uint32_t b; float c; } someStruct; int main (void){ someStruct data; /* ... Fill 'data' with some data for