Legacy serializer deserialize all components no matter what types are specified.
165284
@Override
    public Map<MetadataType, MetadataComponent> deserialize(Descriptor descriptor, EnumSet<MetadataType> types) throws IOException
    {
        Map<MetadataType, MetadataComponent> components = Maps.newHashMap();

        File statsFile = new File(descriptor.filenameFor(Component.STATS));
        if (!statsFile.exists() && types.contains(MetadataType.STATS))
        {
            components.put(MetadataType.STATS, MetadataCollector.defaultStatsMetadata());
        }
        else
        {
            try (DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(statsFile))))
            {
                EstimatedHistogram rowSizes = EstimatedHistogram.serializer.deserialize(in);
                EstimatedHistogram columnCounts = EstimatedHistogram.serializer.deserialize(in);
                ReplayPosition replayPosition = ReplayPosition.serializer.deserialize(in);
                long minTimestamp = in.readLong();
                long maxTimestamp = in.readLong();
                int maxLocalDeletionTime = in.readInt();
                double bloomFilterFPChance = in.readDouble();
                double compressionRatio = in.readDouble();
                String partitioner = in.readUTF();
                int nbAncestors = in.readInt();
                Set<Integer> ancestors = new HashSet<>(nbAncestors);
                for (int i = 0; i < nbAncestors; i++)
                    ancestors.add(in.readInt());
                StreamingHistogram tombstoneHistogram = StreamingHistogram.serializer.deserialize(in);
                int sstableLevel = 0;
                if (in.available() > 0)
                    sstableLevel = in.readInt();

                int colCount = in.readInt();
                List<ByteBuffer> minColumnNames = new ArrayList<>(colCount);
                for (int i = 0; i < colCount; i++)
                    minColumnNames.add(ByteBufferUtil.readWithShortLength(in));

                colCount = in.readInt();
                List<ByteBuffer> maxColumnNames = new ArrayList<>(colCount);
                for (int i = 0; i < colCount; i++)
                    maxColumnNames.add(ByteBufferUtil.readWithShortLength(in));

                if (types.contains(MetadataType.VALIDATION))
                    components.put(MetadataType.VALIDATION,
                                   new ValidationMetadata(partitioner, bloomFilterFPChance));
                if (types.contains(MetadataType.STATS))
                    components.put(MetadataType.STATS,
                                   new StatsMetadata(rowSizes,
                                                     columnCounts,
                                                     replayPosition,
                                                     minTimestamp,
                                                     maxTimestamp,
                                                     maxLocalDeletionTime,
                                                     compressionRatio,
                                                     tombstoneHistogram,
                                                     sstableLevel,
                                                     minColumnNames,
                                                     maxColumnNames,
                                                     true,
                                                     ActiveRepairService.UNREPAIRED_SSTABLE));
                if (types.contains(MetadataType.COMPACTION))
                    components.put(MetadataType.COMPACTION,
                                   new CompactionMetadata(ancestors, null));
            }
        }
        return components;
    }
733582
def deserialize(cls, value, *args, **kwargs):
        

        if isinstance(value, cls.TYPE):
            return value
        elif is_null(value):
            return None
        else:
            return value
273955
private String _serializeComponent(Component component, Map<Object, String> done) throws ConverterException {
	StringBuilder sb = new StringBuilder();
	Component ca;
	component = new ComponentSpecificAccess(Component.ACCESS_PRIVATE, ca = component);
	boolean isPeristent = ca.isPersistent();

	deep++;
	Object member;
	Iterator<Key> it = component.keyIterator();
	Collection.Key key;
	while (it.hasNext()) {
	    key = it.next();
	    member = component.get(key, null);
	    if (member instanceof UDF) continue;
	    sb.append(goIn() + "<var scope=\"this\" name=" + del + key.toString() + del + ">");
	    sb.append(_serialize(member, done));
	    sb.append(goIn() + "</var>");
	}

	Property p;
	Boolean remotingFetch;
	Struct props = ignoreRemotingFetch ? null : ComponentUtil.getPropertiesAsStruct(ca, false);
	ComponentScope scope = ca.getComponentScope();
	it = scope.keyIterator();
	while (it.hasNext()) {
	    key = Caster.toKey(it.next(), null);
	    if (!ignoreRemotingFetch) {
		p = (Property) props.get(key, null);
		if (p != null) {
		    remotingFetch = Caster.toBoolean(p.getDynamicAttributes().get(REMOTING_FETCH, null), null);
		    if (remotingFetch == null) {
			if (isPeristent && ORMUtil.isRelated(p)) continue;
		    }
		    else if (!remotingFetch.booleanValue()) continue;
		}
	    }

	    member = scope.get(key, null);
	    if (member instanceof UDF || key.equals(KeyConstants._this)) continue;
	    sb.append(goIn() + "<var scope=\"variables\" name=" + del + key.toString() + del + ">");
	    sb.append(_serialize(member, done));
	    sb.append(goIn() + "</var>");
	}

	deep--;
	try {
	    // return goIn()+"<struct>"+sb+"</struct>";
	    return goIn() + "<component md5=\"" + ComponentUtil.md5(component) + "\" name=\"" + component.getAbsName() + "\">" + sb + "</component>";
	}
	catch (Exception e) {
	    throw toConverterException(e);
	}
    }
523975
@Override
	public final TypeSerializer<T> restoreSerializer() {
		if (serializer == null) {
			throw new IllegalStateException(
					"Trying to restore the prior serializer via TypeSerializerConfigSnapshot, " +
					"but the prior serializer has not been set.");
		}
		else if (serializer instanceof UnloadableDummyTypeSerializer) {
			Throwable originalError = ((UnloadableDummyTypeSerializer<?>) serializer).getOriginalError();

			throw new IllegalStateException(
					"Could not Java-deserialize TypeSerializer while restoring checkpoint metadata for serializer " +
					"snapshot '" + getClass().getName() + "'. " +
					"Please update to the TypeSerializerSnapshot interface that removes Java Serialization to avoid " +
					"this problem in the future.", originalError);
		} else {
			return this.serializer;
		}
	}
562298
def _deserialize_default(cls, cls_target, obj_raw):
        

        if cls._is_deserialized(cls_target, obj_raw):
            return obj_raw
        elif type(obj_raw) == dict:
            return cls._deserialize_dict(cls_target, obj_raw)
        else:
            return cls_target(obj_raw)
615324
def _deserialize(self, stream):
        """"""
        self.version, self.entries, self._extension_data, conten_sha = read_cache(stream)  # @UnusedVariable
        return self
335000
def _deserialize_property_value(self, to_deserialize: PrimitiveJsonType, deserializer_cls: Type) -> Any:
        
        deserializer = self._create_deserializer_of_type_with_cache(deserializer_cls)
        assert deserializer is not None
        return deserializer.deserialize(to_deserialize)
1151572
def deserialize(self, value, **kwargs):
        
        kwargs.update({'trusted': kwargs.get('trusted', False)})
        if self.deserializer is not None:
            return self.deserializer(value, **kwargs)
        if value is None:
            return None
        if isinstance(value, string_types):
            return value
        if issubclass(self.instance_class, base.HasProperties):
            return self.instance_class.deserialize(value, **kwargs)
        return self.from_json(value, **kwargs)
807202
def serialize(objects=None):
    

    return serializers.serialize(
        "json",
        objects,
        ensure_ascii=True,
        use_natural_foreign_keys=True,
        use_natural_primary_keys=False,
    )
244760
private static Deserializer<?> getDeserializer(Properties props, Optional<Deserializers> deserializerType) throws ReflectiveOperationException {

    Deserializer<?> deserializer;
    if (deserializerType.isPresent()) {
      deserializer = ConstructorUtils.invokeConstructor(deserializerType.get().getDeserializerClass());
    } else {
      deserializer = Deserializer.class
          .cast(ConstructorUtils.invokeConstructor(Class.forName(props.getProperty(KAFKA_DESERIALIZER_TYPE))));
    }
    deserializer.configure(PropertiesUtils.propsToStringKeyMap(props), false);
    return deserializer;
  }
1134819
def deserialize(self, value, **kwargs):
        
        for validator in self.validators:
            validator.validate(value, **kwargs)

        return value
440006
public SerDeserializer findDeserializer(Class<?> type) {
        SerDeserializer deser = deserializers.get(type);
        if (deser != null) {
            return deser;
        }
        for (SerDeserializerProvider provider : providers) {
            deser = provider.findDeserializer(type);
            if (deser != null) {
                return deser;
            }
        }
        return defaultDeserializer;
    }
1095646
function __deserializeType(buffer, start, options) {
	let length = 2;
	let end = start + length;
	let type = null;

	
	if ( (buffer.byteLength - start) >= length ) {
		let typeData = new Uint8Array(buffer, start, length);
		Object.entries(TYPE_HEADER).forEach(([headerKey, headerVal]) => {
			let headerData = new Uint8Array(headerVal);
			if ((typeData[0] === headerData[0]) && (typeData[1] === headerData[1])) {
				type = headerKey.toLowerCase();
			}
		});
	}
	return { anchor: end, value: type };
}
323007
function __deserializeBoolean(type, start, options) {
	let end = start;
	let data = type === DATA_TYPE.TRUE;
	return { anchor: end, value: data };
}
765337
public <T> TypeSerializer<T> getRestoredNestedSerializer(int pos) {
		checkArgument(pos < nestedSnapshots.length);

		@SuppressWarnings("unchecked")
		TypeSerializerSnapshot<T> snapshot = (TypeSerializerSnapshot<T>) nestedSnapshots[pos];

		return snapshot.restoreSerializer();
	}
669495
@Override
    public T deserialize(String messageJson) {
        VersionedMessage<T> versionedMessage = gson.fromJson(messageJson, versionedMessageType);

        // older style messages not wrapped with VersionedMessage
        if (versionedMessage.getVersion() == null) {
            Type t = ((ParameterizedType) versionedMessageType).getActualTypeArguments()[0];
            versionedMessage = new VersionedMessage<>(MessageVersion.NO_VERSION, gson.<T>fromJson(messageJson, t));
        }
        checkVersion(versionedMessage, messageJson);

        return versionedMessage.getMessage();
    }
237922
def deserialize(self, obj):
        """"""
        if obj['immutable']:
            return obj['value']
        else:
            guid = obj['value']
            if not guid in object_registry:
                instance = JSObject(self, guid)
                object_registry[guid] = instance
            return object_registry[guid]