msgpack-cli icon indicating copy to clipboard operation
msgpack-cli copied to clipboard

Trouble deserializing c++ vector

Open benlemond opened this issue 5 years ago • 1 comments

Is there a recommended way to deserialize (in c#) a message pack object packed in c++ containing a std::vector<sometype>?

I tried public List<sometype> but that doesn't seem to be working

benlemond avatar Feb 02 '19 02:02 benlemond

Sorry, I have no idea about best practice for C++'s implementation for std:vector<SomeType>. In general, it is more important that what actual serialized binary is.

I guess that the C++ implementation serializes the vector<T> as array of sometype, so it should be deserialized as List<sometype>. It is possible that this is caused by the declaration of the sometype. Could you put the code of:

  • Sample deserialization code that you ran.
  • Sample serialized binary (such as HEX format string)
  • The declaration of the sometype as you wrote.

yfakariya avatar Feb 03 '19 08:02 yfakariya