[CMDP] ...the values MAY be any of the types supported by the MessagePack specification
This is something we promise in several protocols, so we need to make sure to live up to this in our C++ implementation.
From the specs:
-
Integer represents an integer -
Nil represents nil -
Boolean represents true or false -
Float represents a IEEE 754 double precision floating point number including NaN and Infinity -
Raw -
String extending Raw type represents a UTF-8 string -
Binary extending Raw type represents a byte array
-
-
Array represents a sequence of objects -
Map represents key-value pairs of objects -
Extension represents a tuple of type information and a byte array where type information is an integer whose meaning is defined by applications or MessagePack specification -
Timestamp represents an instantaneous point on the time-line in the world that is independent from time zones or calendars. Maximum precision is nanoseconds.
-
The ones crossed off are quite trivial to pack into a std::variant
, with the others we might have to toy a bit more.
We should also clarify if we would like to allow nested arrays and maps (having a map value being a map) which might quickly become nasty in C++.