Enables object id serialization with type information.