docs: protected Serializer serializer() {
      if (serializer == null) {
        NamespaceConfig namespaceConfig = this.config.getNamespaceConfig();
        if (namespaceConfig == null) {
          namespaceConfig = new NamespaceConfig();
        }
  
        SerializerBuilder serializerBuilder = managementService.getSerializationService().newBuilder(name);
        serializerBuilder.withNamespace(new Namespace(namespaceConfig));
  
        if (config.isRegistrationRequired()) {
          serializerBuilder.withRegistrationRequired();
        }
        if (config.isCompatibleSerialization()) {
          serializerBuilder.withCompatibleSerialization();
        }
  
        if (config.getElementType() != null) {
          serializerBuilder.addType(config.getElementType());
        }
        if (!config.getExtraTypes().isEmpty()) {
          serializerBuilder.withTypes(config.getExtraTypes().toArray(new Class<?>[config.getExtraTypes().size()]));
        }
  
        serializer = serializerBuilder.build();
      }
      return serializer;
    }