I am brand new trying msgpack. I need to serialize an object (an instance of a user-defined class) that contains pointers (internal tree, hashes, etc.) and some basic attribute types.
So far, I can do what is done in the wiki msgpack.org short example, just serialize the class in msgpack::sbuffer, and then read the buffer for unserialize.
But now I want to send this buffer to a file or the serialization result to a file, and then non-esterize it.
Can someone give me some tips on how to do this? I browse and read enough to get tired of it :)
My code looks like this:
msgpack::sbuffer sbuf;
msgpack::pack(sbuf, cluster);
msgpack::unpacked msg;
msgpack::unpack(&msg, sbuf.data(), sbuf.size());
msgpack::object obj = msg.get();
clustering clustUnser
obj.convert(&clustUnser);
Thanks everyone!
Bests,
Luchux.