This implementation uses resource URI as serial

@see FileReferenceSerializer::unserializeFile
183190
public function unserializeFile($serial)
    {
        $properties = $this->getResourceFilePropertiesValues($serial);

        return $this->getRootDirectory($properties[self::RESOURCE_FILE_FILESYSTEM_URI])
            ->getFile($properties[self::RESOURCE_FILE_PATH].'/'.$properties[self::RESOURCE_FILE_NAME]);
    }
484344
public function unserialize($serializedData)
    {
        $repositoryData = json_decode($serializedData, true);
        $references     = $repositoryData['references'];

        foreach ($references as $name => $proxyReference) {
            $this->setReference(
                $name,
                $this->getManager()->getReference(
                    $proxyReference[0], // entity class name
                    $proxyReference[1]  // identifiers
                )
            );
        }

        $identities = $repositoryData['identities'];

        foreach ($identities as $name => $identity) {
            $this->setReferenceIdentity($name, $identity);
        }
    }
1345299
private function unserialize($value)
    {
        switch ($this->serializer) {
            case self::SERIALIZER_PHP:
                return unserialize($value);
            case self::SERIALIZER_IGBINARY:
                return igbinary_unserialize($value);
            default:
                throw new RuntimeException('Unable to handle unserialization of the metadata object');
        }
    }
482875
public function unserialize($serialized)
    {
        list($type, $id) = json_decode($serialized);
        $this->type = $type;
        $this->id = $id;
    }
725704
public function unserialize( $serial )
	{
		list( $this->message, $this->code, $this->file, $this->line, $this->errors, $this->form ) = unserialize( $serial );
	}
740214
public function unserialize( $serialization ) {
		$serializationData = unserialize( $serialization );

		foreach ( $serializationData['data'] as $offset => $value ) {
			// Just set the element, bypassing checks and offset resolving,
			// as these elements have already gone through this.
			parent::offsetSet( $offset, $value );
		}

		$this->indexOffset = $serializationData['index'];

		$this->typePointers = $serializationData['typePointers'];

		if ( array_key_exists( 'assoc', $serializationData ) ) {
			$this->isAssociative = $serializationData['assoc'] === 'n' ? null : $serializationData['assoc'] === 't';
		}
	}
1320432
public function unserialize($data)
    {
        $object = unserialize($data);

        $this->resolver = $object['resolver'];
        $this->collection = $object['collection'];
    }
584580
public function unserialize($serialized)
    {
        $data = unserialize($serialized);
        
        $this->autoNumber              =  $data['autoNumber'];            
        $this->byteLength              =  $data['byteLength'];            
        $this->calculated              =  $data['calculated'];            
        $this->calculatedFormula       =  $data['calculatedFormula'];     
        $this->caseSensitive           =  $data['caseSensitive'];         
        $this->controllerName          =  $data['controllerName'];        
        $this->createable              =  $data['createable'];            
        $this->custom                  =  $data['custom'];                
        $this->defaultValueFormula     =  $data['defaultValueFormula'];   
        $this->defaultedOnCreate       =  $data['defaultedOnCreate'];     
        $this->dependentPicklist       =  $data['dependentPicklist'];     
        $this->deprecatedAndHidden     =  $data['deprecatedAndHidden'];   
        $this->digits                  =  $data['digits'];                
        $this->externalId              =  $data['externalId'];            
        $this->filterable              =  $data['filterable'];            
        $this->groupable               =  $data['groupable'];             
        $this->htmlFormatted           =  $data['htmlFormatted'];         
        $this->idLookup                =  $data['idLookup'];              
        $this->inlineHelpText          =  $data['inlineHelpText'];        
        $this->label                   =  $data['label'];                 
        $this->length                  =  $data['length'];                
        $this->name                    =  $data['name'];                  
        $this->nameField               =  $data['nameField'];             
        $this->namePointing            =  $data['namePointing'];          
        $this->nillable                =  $data['nillable'];              
        $this->permissionable          =  $data['permissionable'];        
        $this->picklistValues          =  $data['picklistValues'];        
        $this->precision               =  $data['precision'];             
        $this->referenceTo             =  $data['referenceTo'];           
        $this->relationshipName        =  $data['relationshipName'];      
        $this->relationshipOrder       =  $data['relationshipOrder'];     
        $this->restrictedPicklist      =  $data['restrictedPicklist'];    
        $this->scale                   =  $data['scale'];                 
        $this->soapType                =  $data['soapType'];              
        $this->sortable                =  $data['sortable'];              
        $this->type                    =  $data['type'];                  
        $this->unique                  =  $data['unique'];                
        $this->updateable              =  $data['updateable'];            
        $this->writeRequiresMasterRead =  $data['writeRequiresMasterRead'];
    }
903553
public function unserialize($serialized)
    {
        $data = unserialize($serialized);
        $this->_data = $data['data'];
        $this->_iteratorClass = $data['iteratorClass'];
        parent::__construct();
    }
1040890
public function unserializeFile($serial)
    {
        $parts = $this->extract($serial);

        return $this->getRootDirectory(urldecode($parts['fs']))->getFile(urldecode($parts['path']));
    }
946068
private function resolveCache()
    {
        if (!$this->filesystem->exists($this->cacheFile)) {
            throw new \RuntimeException(sprintf(
                'The file "%s" can\'t be parsed!',
                $this->cacheFile
            ));
        }

        return unserialize(file_get_contents($this->cacheFile));
    }
597554
public function unserialize($data)
    {
        ClosureStream::register();

        if (static::$securityProvider !== null) {
            if ($data[0] !== '@') {
                throw new SecurityException("The serialized closure is not signed. ".
                    "Make sure you use a security provider for both serialization and unserialization.");
            }

            $data = json_decode(substr($data, 1), true);

            if (!is_array($data) || !static::$securityProvider->verify($data)) {
                throw new SecurityException("Your serialized closure might have been modified and it's unsafe to be unserialized. " .
                    "Make sure you use the same security provider, with the same settings, " .
                    "both for serialization and unserialization.");
            }

            $data = $data['closure'];
        } elseif ($data[0] === '@') {
            throw new SecurityException("The serialized closure is signed. ".
                "Make sure you use a security provider for both serialization and unserialization.");
        }

        $this->code = \unserialize($data);

        // unset data
        unset($data);

        $this->code['objects'] = array();

        if ($this->code['use']) {
            $this->scope = new ClosureScope();
            $this->code['use'] = $this->resolveUseVariables($this->code['use']);
            $this->mapPointers($this->code['use']);
            extract($this->code['use'], EXTR_OVERWRITE | EXTR_REFS);
            $this->scope = null;
        }

        $this->closure = include(ClosureStream::STREAM_PROTO . '://' . $this->code['function']);

        if($this->code['this'] === $this){
            $this->code['this'] = null;
        }

        if ($this->code['scope'] !== null || $this->code['this'] !== null) {
            $this->closure = $this->closure->bindTo($this->code['this'], $this->code['scope']);
        }

        if(!empty($this->code['objects'])){
            foreach ($this->code['objects'] as $item){
                $item['property']->setValue($item['instance'], $item['object']->getClosure());
            }
        }

        $this->code = $this->code['function'];
    }
1017717
public function retrieve($uri)
    {
        $errorMessage = null;
        set_error_handler(function ($errno, $errstr) use (&$errorMessage) {
            $errorMessage = $errstr;
        });
        $response = file_get_contents($uri);
        restore_error_handler();

        if ($errorMessage) {
            throw new ResourceNotFoundException($errorMessage);
        }

        if (false === $response) {
            throw new ResourceNotFoundException('JSON schema not found at ' . $uri);
        }

        if ($response == ''
            && substr($uri, 0, 7) == 'file://' && substr($uri, -1) == '/'
        ) {
            throw new ResourceNotFoundException('JSON schema not found at ' . $uri);
        }

        $this->messageBody = $response;
        if (!empty($http_response_header)) {
            // $http_response_header cannot be tested, because it's defined in the method's local scope
            // See http://php.net/manual/en/reserved.variables.httpresponseheader.php for more info.
            $this->fetchContentType($http_response_header); // @codeCoverageIgnore
        } else {                                            // @codeCoverageIgnore
            // Could be a "file://" url or something else - fake up the response
            $this->contentType = null;
        }

        return $this->messageBody;
    }
741993
public function unserialize($serialized)
    {
        list($this->message, $this->code, $this->file, $this->line) = unserialize($serialized);
    }
1273332
public function serialize($abstraction)
    {
        if ($abstraction instanceof File) {
            $baseDir = $this->getRootDirectory($abstraction->getFileSystemId());

            return 'file://'.urlencode($abstraction->getFileSystemId()).'/'.urlencode(
                    $baseDir->getRelPath($abstraction)
                );
        } elseif ($abstraction instanceof Directory) {
            $baseDir = $this->getRootDirectory($abstraction->getFileSystemId());

            return 'dir://'.urlencode($abstraction->getFileSystemId()).'/'.urlencode(
                    $baseDir->getRelPath($abstraction)
                );
        } else {
            throw new FileSerializerException(
                __CLASS__.'::'.__FUNCTION__.' expects parameter to be an instance of Directory or File'
            );
        }
    }
175212
protected function _unserialize($alias, $data) {
		if (!is_string($data)) {
			return $data;
		}
		return call_user_func($this->config[$alias]['unserialize'], $data);
	}
773837
public function unserialize($serialized)
    {
        list(
            $this->ffmpegBinary,
            $this->movieFile,
            $this->output,
            $this->frameNumber,
            $this->provider
        ) = unserialize($serialized);
    }