Open KoHcoJlb opened 6 years ago
Could you elaborate the question? In addition, if you post a complete and minimal code that describes the issue, it is very helpful. You can use Wandbox for this. See https://wandbox.org/permlink/xIejfhw3v2y2SkBK
Modify code, click "Run", then click "Share", you can get updated permalink on your address bar.
In your code snippet why derived
is serialized to {"base":{"i":10},"j":20}
instead of {"i":10,"j":20}
?
msgpack-c class adaptor is mapped to MAP
or ARRAY
. It is a design choice.
It is not all reason for that, but the base class and derived class could have the same name variables. Here is the example: https://wandbox.org/permlink/fs6iOWPCmT0qSEpS
Shouldn't it pack base class fields into the map root?