Supported objects

These templates support serialization and deserialization of the following objects:

A serialized object can be deserialized only into a structurally compatible object. It goes without saying that an object is structurally compatible to any object of the same exact class. All containers of the same class are structurally compatible. A serialized std::list<std::string> can be deserialized into a std::vector<std::string>, and vice versa. This applies to all supported container types. A std::map is structurally compatible to a container of a std::pair of the key and value types, so a serialized std::map<int, std::string> may be deserialized into a std::list<std::pair<int, std::string> >. The opposite is also true, but only as long as the serialized keys are unique. An exception gets thrown if a deserialized value cannot be inserted into its container.

All floating point types are converted to strings before serialization, so floating point objects are structurally compatible with a std::string. This also means that a serialized std::string may be deserialized into a native floating point object. An exception gets thrown if the serialized string cannot be parsed as a floating point type. It is undefined whether an exception gets thrown if the floating point type has insufficient precision for the serialized floating value.

Native character string literals are structurally compatible to their corresponding std::basic_string types. Although native character string literals may be serialized, deserializing native character string literals is functionally meaningless. Literal strings may be deserialized only into std::basic_string or its structurally compatible containers.