All key serialization (metadata.base.BaseObject) moved to a separate static method