Skip to content

Serialization

When serializing ObjectProperty, a set of bit flags may be employed to change serialization behavior.

BitNameDescription
0UseFlagsIndicates that the set of flags should be used during data processing.
1CompactPrefixEnables the use of smaller data types for length prefixes whenever possible.
2StringEnumIndicates that enums should be represented as strings.
3ZLibCompressEnables data compression using the Zlibrary.
4EncodeIndicates that all properties with bitflag of 8 must be included.

Figure A.I - A table of all possible bit flags for an object serializer.

Serialization Modes

ObjectProperty serializers should anticipate two separate types of serialization: verbose, and compact.

In either case, a PropertyClass buffer will always prefix itself with its property hash.

Compact

In passage through the DML, a compact serializer is used. In compact mode, property hashes and their length are skipped during serialization. Properties are listed in order as they are written in reflection.

WARNING

If the field is another PropertyClass and it is null, an empty uint32_t will be serialized in place of the missing object.

It should also be noted that any property with the deprecated flag is still serialized in this mode.

Verbose

In all other cases, a verbose serializer is employed. This is an exhaustive serialization method that allows for out of order properties.

In this mode, property hashes and their exact binary size will be serialized.