Add support for enum classes. They are serialized with a new serialize type MSGPACK_SERIALIZE_TYPE_ENUM (dynamic id 6) and stored by using the enum class name as key and the enum case name as value.
For example the serialized message pack blob from the added test (generated by msgpack-inspect):
This is incompatible with enums serialized before this change as they have been serialized as normal classes and thus did not set a numeric serialize type but the class name instead. Thus, old data will continue to fail deserialization in the same way if it does contain a serialized enum.
Add support for enum classes. They are serialized with a new serialize type
MSGPACK_SERIALIZE_TYPE_ENUM
(dynamic id 6) and stored by using the enum class name as key and the enum case name as value.For example the serialized message pack blob from the added test (generated by
msgpack-inspect
):Fixes issue #171.
This is incompatible with enums serialized before this change as they have been serialized as normal classes and thus did not set a numeric serialize type but the class name instead. Thus, old data will continue to fail deserialization in the same way if it does contain a serialized enum.