Use the default KryoInstantiator to serialize the KryoInstantiator ki
same as: setSerialized(conf, KryoInstantiator.class, ki)
432453
public static void setSerialized(Config conf, KryoInstantiator ki)
    throws ConfigurationException {
    setSerialized(conf, KryoInstantiator.class, ki);
  }
1306521
public UserManagedCacheBuilder<K, V, T> withKeySerializer(Serializer<K> keySerializer) {
    if (keySerializer == null) {
      throw new NullPointerException("Null key serializer");
    }
    UserManagedCacheBuilder<K, V, T> otherBuilder = new UserManagedCacheBuilder<>(this);
    otherBuilder.keySerializer = keySerializer;
    return otherBuilder;
  }
461160
@Override
	protected void unserializeFrom(RawDataBuffer in)
    {
        super.unserializeFrom(in);
        boolean hasMessage = in.readBoolean();
        if (hasMessage)
        {
            message = MessageSerializer.unserializeFrom(in, false);
        }
    }
1295513
@SuppressWarnings("unchecked")
	public static <T> T unserialize(byte[] bytes) {
		ObjectInputStream ois = null;
		try {
			ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
			ois = new ObjectInputStream(bais);
			return (T) ois.readObject();
		} catch (Exception e) {
			throw new UtilException(e);
		}
	}
388945
def getserialized(self, key, decoder_func=None, **kwargs):
        

        value = self.get(key, cast_func=None, **kwargs)

        if isinstance(value, (dict, list, tuple)) or value is None:
            return value

        if decoder_func: return decoder_func(value)

        try:
            o = json.loads(value)
            return o
        except json.decoder.JSONDecodeError: pass

        try:
            o = yaml.load(value)
            return o
        except yaml.parser.ParserError: pass

        raise ValueError('Unable to parse {} setting using JSON or YAML.'.format(key))
783688
@Override
  public Kryo create() {
    LOGGER.trace("Creating Kryo instance for {}", this);
    Kryo kryo = new Kryo();
    kryo.setClassLoader(classLoader);
    kryo.setRegistrationRequired(registrationRequired);

    // If compatible serialization is enabled, override the default serializer.
    if (compatible) {
      kryo.setDefaultSerializer(CompatibleFieldSerializer::new);
    }

    // TODO rethink whether we want to use StdInstantiatorStrategy
    kryo.setInstantiatorStrategy(
        new Kryo.DefaultInstantiatorStrategy(new StdInstantiatorStrategy()));

    for (RegistrationBlock block : registeredBlocks) {
      int id = block.begin();
      if (id == FLOATING_ID) {
        id = kryo.getNextRegistrationId();
      }
      for (Pair<Class<?>[], Serializer<?>> entry : block.types()) {
        register(kryo, entry.getLeft(), entry.getRight(), id++);
      }
    }
    return kryo;
  }
1193819
private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString)
    {
        set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) {
            $error = UnexpectedValueException::fromUncleanUnSerialization(
                $reflectionClass,
                $message,
                $code,
                $file,
                $line
            );
        });

        try {
            unserialize($serializedString);
        } catch (Exception $exception) {
            restore_error_handler();

            throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception);
        }

        restore_error_handler();

        if ($error) {
            throw $error;
        }
    }
1212882
public CacheConfigurationBuilder<K, V> withKeySerializer(Serializer<K> keySerializer) {
    return withSerializer(new DefaultSerializerConfiguration<>(requireNonNull(keySerializer, "Null key serializer"), DefaultSerializerConfiguration.Type.KEY));
  }
893932
public CacheConfigurationBuilder<K, V> withValueSerializer(Serializer<V> valueSerializer) {
    return withSerializer(new DefaultSerializerConfiguration<>(requireNonNull(valueSerializer, "Null value serializer"), DefaultSerializerConfiguration.Type.VALUE));
  }
524178
public KryoInstantiator setInstantiatorStrategy(final InstantiatorStrategy inst) {
    return new KryoInstantiator() {
      public Kryo newKryo() {
        Kryo k = KryoInstantiator.this.newKryo();
        k.setInstantiatorStrategy(inst);
        return k;
      }
    };
  }
737972
def _deserialize(self, value, attr, data):
        """"""
        token_builder = URLSafeTimedSerializer(
            current_app.config['SECRET_KEY'],
            salt=data['verb'],
        )
        result = token_builder.loads(value, max_age=current_app.config[
            'OAISERVER_RESUMPTION_TOKEN_EXPIRE_TIME'])
        result['token'] = value
        result['kwargs'] = self.root.load(result['kwargs'], partial=True).data
        return result
132025
def _serialize(cls, key, value, fields):
        
        converter = cls._get_converter_for_field(key, None, fields)
        return converter.serialize(value)
970823
public static <T extends PersistableTransfer> T deserializeFrom(
            String serialized) {
        if (serialized == null)
            return null;
        ByteArrayInputStream byteStream = new ByteArrayInputStream(
                serialized.getBytes(UTF8));
        try{
            return deserializeFrom(byteStream);
        }finally{
            try { byteStream.close(); } catch(IOException ioe) { } ;
        }
    }
206423
@Override
	protected void unserializeFrom(RawDataBuffer in)
    {
    	super.unserializeFrom(in);
    	consumerId = new IntegerID(in.readInt());
    }
416697
public <T> void setSerializer (Class<T> type, JsonSerializer<T> serializer) {
		classToSerializer.put(type, serializer);
	}
1112888
public static void setSerializations(Configuration conf) {
		String serializations = conf.get(HADOOP_IO_SERIALIZATIONS);

		LinkedList<String> list = new LinkedList<String>();

		if(serializations != null && !serializations.isEmpty())
			Collections.addAll(list, serializations.split(","));

		// required by MultiInputSplit
		String writable = WritableSerialization.class.getName();
		String tuple = TupleSerialization.class.getName();

		list.remove(writable);
		list.remove(tuple);

		list.addFirst(writable);
		list.addFirst(tuple);

		// make writable last
		conf.set(HADOOP_IO_SERIALIZATIONS, Util.join(list, ","));
	}
403555
@Override
    public void serialize(ConstraintViolationImpl constraintViolation, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeStartObject();
        jsonGenerator.writeStringField("message", constraintViolation.getMessage());
        Object invalidValue = constraintViolation.getInvalidValue();
        if (invalidValue != null) {
            jsonGenerator.writeStringField("invalid", invalidValue.toString());
        }
        if (constraintViolation.getPropertyPath() != null) {
            jsonGenerator.writeStringField("path", constraintViolation.getPropertyPath().toString());
        }
        jsonGenerator.writeEndObject();
    }