return the deserialized (restored) value from the registered handler for the type
168171
def type_handler_object(val, objtype):
    
    handler = handlers.get(objtype)
    if handler:
        return handler().restore(val)
    else:
        return objtype(val)
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 };
}
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))
1274215
def _deserialize_value(val, raw: false)
      val = val.pack('C*')
      val = @desc.post_process(val) if !raw && @desc.read_processors?
      val
    end
935520
def _converter(data):
    
    handler = REGISTRY.get(data.__class__)
    if handler:
        full_name = '{}.{}'.format(
            data.__class__.__module__,
            data.__class__.__name__)
        return {
            '__class__': full_name,
            '__value__': handler(data),
        }
    raise TypeError(repr(data) + " is not JSON serializable")
896459
function(type, handler) {
		var id = type.$instanceid;
		var obs = this._observers;
		var handlers = obs[id] || (obs[id] = []);
		if (handlers.indexOf(handler) === -1) {
			handlers.push(handler);
		}
		return type;
	}
1134817
def _unicode_handler(obj):
    
    try:
        result = obj.isoformat()
    except AttributeError:
        raise TypeError("Unserializable object {} of type {}".format(obj,
                                                                     type(obj)))

    return result
386705
def json_decoder_to_deserializer(decoder_cls: Union[Type[JSONDecoder], Callable[[], Type[JSONDecoder]]]) \
        -> Type[Deserializer]:
    
    name = decoder_cls.__name__ if isinstance(decoder_cls, type) else "%sLambdaTypeReturn" % id(decoder_cls)
    return type(
        "%sAsDeserializer" % name,
        (_JSONDecoderAsDeserializer,),
        {
            "decoder_type": property(lambda self: decoder_cls if isinstance(decoder_cls, type) else decoder_cls())
        }
    )
243305
private <T> T deserializeResult(Response response, @Nullable String envelopeFieldName, TypeRef returnType) throws WebApplicationException {
        String contentType = readContentType(response);
        String body = readBody(response);

        if (contentType.startsWith("application/json")) {
            try {
                if (envelopeFieldName!=null) {
                    return jsonMarshaller.deserializeEnveloped(body, envelopeFieldName, returnType);
                } else {
                    return jsonMarshaller.deserialize(body, returnType);
                }
            } catch (JsonMarshallingException e) {
                String msg = "Failed unmarshalling JSON data from server to object: "+e.getMessage();
//                throw new ClientErrorException(Response.Status.BAD_REQUEST, e);

                Retry retry;
                if (response.getStatusInfo().getFamily() == Response.Status.Family.SERVER_ERROR) {
                    //it is likely that the server can handle it next time, and there won't be an error at all.
                    //then there won't be a problem unmarshalling the error info either.
                    retry = Retry.now();
                } else {
                    //success:      no, because it's unlikely the server sends a different response next time.
                    //client error: no, because the client's data is wrong anyway, we just can't understand the detail
                    //              why it's wrong, but it's still wrong next time.
                    //              this could happen when the client uses an outdated protocol. server rejects it, and
                    //              the client can't even understand (the detail of) the response.
                    retry = Retry.no();
                }
                throw new ClientServiceException(
                        new RestFaultInfo(
                                "Protocol", Blame.CLIENT,
                                msg, ""+ErrorCodes.Client.UNMARSHALLING_FAILED.getCode(),
                                null,
                                retry, retry,
                                response.getStatusInfo().getStatusCode(),
                                response.getStatusInfo().getReasonPhrase()
                        ), e
                );
            }
        } else if (returnType.getType().equals(String.class)) {
            // Expecting string, return the raw response body.
            return (T) body;
        } else {
            String msg = "Client requested content type >>>"+ACCEPT+"<<< but server sent >>>\"" + contentType + "\"<<< and that is not supported for type: " + returnType.getType();
//            throw new NotSupportedException(msg);
            throw new BadResponseServiceException(
                    new RestFaultInfo("BadResponse", Blame.SERVER,
                            msg, ""+ErrorCodes.Server.BAD_RESPONSE.getCode(),
                            null,
                            Retry.no(), Retry.no(),
                            response.getStatusInfo().getStatusCode(),
                            response.getStatusInfo().getReasonPhrase()
                    )
            );
        }
    }
789929
@UsedByGeneratedCode
	public static ReloadableType getReloadableType(int typeRegistryId, int typeId) {
		if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) {
			log.info(
					">TypeRegistry.getReloadableType(typeRegistryId=" + typeRegistryId + ",typeId=" + typeId + ")");
		}
		TypeRegistry typeRegistry = registryInstances[typeRegistryId].get();
		if (typeRegistry == null) {
			throw new IllegalStateException("Request to access registry id " + typeRegistryId
					+ " but no registry with that id has been created");
		}
		ReloadableType reloadableType = typeRegistry.getReloadableType(typeId);
		if (reloadableType == null) {
			throw new IllegalStateException("The type registry " + typeRegistry + " does not know about type id "
					+ typeId);
		}
		reloadableType.setResolved();
		if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) {
			log.info("<TypeRegistry.getReloadableType(typeRegistryId=" + typeRegistryId + ",typeId=" + typeId
					+ ") returning " + reloadableType);
		}
		reloadableType.createTypeAssociations();
		return reloadableType;
	}
383367
function __deserializeData(type, buffer, start, options) {
	let result = {anchor:start, value:undefined};
	if (type === DATA_TYPE.NULL) {
		result = __deserializeNull(start, options);
	}
	else if (type === DATA_TYPE.FALSE || type === DATA_TYPE.TRUE) {
		result = __deserializeBoolean(type, start, options);
	}
	else if (type === DATA_TYPE.INT8) {
		result = __deserializeInt8(buffer, start, options);
	}
	else if (type === DATA_TYPE.INT16) {
		result = __deserializeInt16(buffer, start, options);
	}
	else if (type === DATA_TYPE.INT32) {
		result = __deserializeInt32(buffer, start, options);
	}
	else if (type === DATA_TYPE.INT64) {
		result = __deserializeInt64(buffer, start, options);
	}
	else if (type === DATA_TYPE.INT128) {
		result = __deserializeInt128(buffer, start, options);
	}
	else if (type === DATA_TYPE.INT256) {
		result = __deserializeInt256(buffer, start, options);
	}
	else if (type === DATA_TYPE.INT512) {
		result = __deserializeInt512(buffer, start, options);
	}
	else if (type === DATA_TYPE.INTVAR) {
		result = __deserializeIntVar(buffer, start, options);
	}
	else if (type === DATA_TYPE.UINT8) {
		result = __deserializeUInt8(buffer, start, options);
	}
	else if (type === DATA_TYPE.UINT16) {
		result = __deserializeUInt16(buffer, start, options);
	}
	else if (type === DATA_TYPE.UINT32) {
		result = __deserializeUInt32(buffer, start, options);
	}
	else if (type === DATA_TYPE.UINT64) {
		result = __deserializeUInt64(buffer, start, options);
	}
	else if (type === DATA_TYPE.UINT128) {
		result = __deserializeUInt128(buffer, start, options);
	}
	else if (type === DATA_TYPE.UINT256) {
		result = __deserializeUInt256(buffer, start, options);
	}
	else if (type === DATA_TYPE.UINT512) {
		result = __deserializeUInt512(buffer, start, options);
	}
	else if (type === DATA_TYPE.UINTVAR) {
		result = __deserializeUIntVar(buffer, start, options);
	}
	else if (type === DATA_TYPE.FLOAT32) {
		result = __deserializeFloat32(buffer, start, options);
	}
	else if (type === DATA_TYPE.FLOAT64) {
		result = __deserializeFloat64(buffer, start, options);
	}
	else if (type === DATA_TYPE.STRING) {
		result = __deserializeString(buffer, start, options);
	}
	else if (type === DATA_TYPE.ARRAY) {
		result = __deserializeArray(buffer, start, options);
	}
	else if (type === DATA_TYPE.ARRAY_START) {
		result = __deserializeArrayStreaming(buffer, start, options);
	}
	else if (type === DATA_TYPE.OBJECT) {
		result = __deserializeObject(buffer, start, options);
	}
	else if (type === DATA_TYPE.OBJECT_START) {
		result = __deserializeObjectStreaming(buffer, start, options);
	}
	else if (type === DATA_TYPE.DATE) {
		result = __deserializeDate(buffer, start, options);
	}
	else if (type === DATA_TYPE.OBJECTID) {
		result = __deserializeObjectId(buffer, start, options);
	}
	else if (type === DATA_TYPE.BINARY) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = Binary.FromArrayBuffer(result.value);
	}
	else if (type === DATA_TYPE.ARRAY_BUFFER) {
		result = __deserializeArrayBuffer(buffer, start, options);
	}
	else if (type === DATA_TYPE.DATA_VIEW) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = new DataView(result.value);
	}
	else if (type === DATA_TYPE.UINT8_ARRAY) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = new Uint8Array(result.value);
	}
	else if (type === DATA_TYPE.INT8_ARRAY) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = new Int8Array(result.value);
	}
	else if (type === DATA_TYPE.UINT16_ARRAY) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = new Uint16Array(result.value);
	}
	else if (type === DATA_TYPE.INT16_ARRAY) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = new Int16Array(result.value);
	}
	else if (type === DATA_TYPE.UINT32_ARRAY) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = new Uint32Array(result.value);
	}
	else if (type === DATA_TYPE.INT32_ARRAY) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = new Int32Array(result.value);
	}
	else if (type === DATA_TYPE.FLOAT32_ARRAY) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = new Float32Array(result.value);
	}
	else if (type === DATA_TYPE.FLOAT64_ARRAY) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = new Float64Array(result.value);
	}
	else if (type === DATA_TYPE.SPECIAL_BUFFER) {
		result = __deserializeArrayBuffer(buffer, start, options);
		result.value = HAS_NODE_BUFFER ? Buffer.from(result.value) : new Uint8Array(result.value);
	}
	
	return result;
}
1366051
public static <T> T recoveredValue(Class<T> type, String properties) throws ExecutionException {
        return recoveredValueASArray(type, properties)[0];
    }
582606
function __deserializeDate(buffer, start, options) {
	let end = start + 8;
	let dataView = new DataView(buffer);
	let data = new Date(dataView.getFloat64(start, true));
	return { anchor: end, value: data };
}
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;
		}
	}
1348187
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
        output_list = [self.prop.deserialize(val, **kwargs)
                       for val in value]
        return self._class_container(output_list)
358752
function getDeserializer(type, subtype)
{
    if (Array.isArray(type))
        return compositeDeserializer(_.map(type, function(value) { return getDeserializer(value, subtype); }));

    return function deserializer(val)
    {
        return val !== null ? Deserializers[type](val, subtype) : null;
    };
}
69200
def _GetSerializedAttributeContainerByIndex(self, container_type, index):
    
    container_list = self._GetSerializedAttributeContainerList(container_type)
    return container_list.GetAttributeContainerByIndex(index)