The serializer for the given class.
198081
public final <T> SerializerJson<T> serializer(Class<T> cl)
  {
    return (SerializerJson) _serMap.get(cl);
  }
163900
def get_serializer(self, *args, **kwargs):
        
        if isinstance(kwargs.get('data', {}), list):
            kwargs['many'] = True
        return super().get_serializer(*args, **kwargs)
956735
private BTreeKeySerializer<?> getBTreeKeySerializerFromClass(Class<?> klass) {
        if(klass == Integer.class) {
            return BTreeKeySerializer.ZERO_OR_POSITIVE_INT;
        }
        else if(klass == Long.class) {
            return BTreeKeySerializer.ZERO_OR_POSITIVE_LONG;
        }
        else if(klass == String.class) {
            return BTreeKeySerializer.STRING;
        }
        return null; //Default POJO serializer
    }
461473
public final void register(Class type, Serializer serializer) {
        if (type == null) {
            throw new IllegalArgumentException("Class type information is required!");
        }
        if (serializer.getTypeId() <= 0) {
            throw new IllegalArgumentException(
                    "Type ID must be positive! Current: " + serializer.getTypeId() + ", Serializer: " + serializer);
        }
        safeRegister(type, createSerializerAdapter(serializer, this));
    }
946992
public Serializer getDefaultSerializer (Class type) {
		if (type == null) throw new IllegalArgumentException("type cannot be null.");

		Serializer serializerForAnnotation = getDefaultSerializerForAnnotatedType(type);
		if (serializerForAnnotation != null) return serializerForAnnotation;

		for (int i = 0, n = defaultSerializers.size(); i < n; i++) {
			DefaultSerializerEntry entry = defaultSerializers.get(i);
			if (entry.type.isAssignableFrom(type) && entry.serializerFactory.isSupported(type))
				return entry.serializerFactory.newSerializer(this, type);
		}

		return newDefaultSerializer(type);
	}
388072
public Serializer getSerializer(Class cl)
        throws HessianProtocolException {
        Serializer serializer;

        serializer = (Serializer) _cachedSerializerMap.get(cl);

        if (serializer != null) {
            return serializer;
        }

        serializer = loadSerializer(cl);

        _cachedSerializerMap.put(cl, serializer);

        return serializer;
    }
183665
def serializer_class
      if Gruf.error_serializer
        Gruf.error_serializer.is_a?(Class) ? Gruf.error_serializer : Gruf.error_serializer.to_s.constantize
      else
        Gruf::Serializers::Errors::Json
      end
    end
751090
private <T extends Serializable> Serializer getSerializer(QName xmlType, Class<T> clazz)
      throws SecurityException,
      NoSuchMethodException,
      IllegalArgumentException,
      IllegalAccessException,
      InvocationTargetException {
    Method getSerializer = clazz.getMethod("getSerializer", String.class, Class.class, QName.class);
    return (Serializer) getSerializer.invoke(null, null, clazz, xmlType);
  }
807202
def serialize(objects=None):
    

    return serializers.serialize(
        "json",
        objects,
        ensure_ascii=True,
        use_natural_foreign_keys=True,
        use_natural_primary_keys=False,
    )
518783
def copy(self):
        '''
         
        '''
        try:
            tmp = self.__class__()
        except Exception:
            tmp = self.__class__(self._pdict)
            
        tmp._serializers = self._serializers
        tmp.__deserializers = self.__deserializers

        return tmp
140956
def _serialize(self, value, attr, obj, **kwargs):
        """"""
        ret = self._validated(value)
        return (
            self._to_string(ret)
            if (self.as_string and ret not in (None, missing_))
            else ret
        )
1218342
public void serialize(Writer writer, boolean verbose) throws IOException {
        Serializer serializer;

        //Try to avoid double-buffering or buffering in-memory
        //writers.
        Class writerClass = writer.getClass();
        if (!StringWriter.class.isAssignableFrom(writerClass) &&
            !CharArrayWriter.class.isAssignableFrom(writerClass) &&
            !BufferedWriter.class.isAssignableFrom(writerClass)) {
            writer = new BufferedWriter(writer);
        }

        if (verbose)
        {
            serializer = new SerializerVerbose(writer);
        }
        else
        {
            serializer = new Serializer(writer);
        }
        serializer.writeObject(this).flush();
    }
976609
def get_serializer_class(self, view, method_func):
        
        if hasattr(method_func, 'request_serializer'):
            return getattr(method_func, 'request_serializer')

        if hasattr(view, 'serializer_class'):
            return getattr(view, 'serializer_class')

        if hasattr(view, 'get_serializer_class'):
            return getattr(view, 'get_serializer_class')()

        return None
283956
public Serializer registerClassLoader(String className, ClassLoader classLoader) {
    classLoaders.put(className, classLoader);
    return this;
  }
860192
public SerializerConfig setClass(final Class<? extends Serializer> clazz) {
        String className = clazz == null ? null : clazz.getName();
        return setClassName(className);
    }
398886
protected function serializer()
    {
        if (null === $this->serializer) {
            $self = $this;
            $this->serializer = Closure::bind($this->bindSerializer(), null, $this->class);
        }
        return $this->serializer;
    }
308524
static void serialize(DataOutput out, Serializers serializers)
      throws IOException {
    StringBuilder msg = new StringBuilder(String.format("Serialize %d serializer classes:", serializers.serializers.values().size()));
    int size = serializers.serializers.values().size();

    out.writeInt(size);
    if (size > 0) {
      for (SerializerWrapper sw : serializers.serializers.values()) {
        int index = sw.index;
        String name = sw.serializer.getClass().getName();

        out.writeInt(index);
        out.writeUTF(name);

        msg.append(String.format("%n  (%d) %s", index, name));
      }
      LOGGER.info(msg.toString());
    }
  }