Add examples to serialize/deserialize documentation and fix an enum bug to make all unit tests pass.
Enable unittest base examples in the docs.