Handler::unserializeResponse()

@return
514176
protected function unserializeResponse($response = null){
        switch($this->getEndpoint()){
            case "json":
                return json_decode($response,true);
                break;
            case "xml":
                return (array) json_decode(json_encode(simplexml_load_string($response, null, LIBXML_NOCDATA)),true);
                break;
            default:
                throw new \ErrorException('Invalid response type');
                break;
        }
    }
480901
private function unserializeResponse($serialized, MessageFactoryInterface $messageFactory)
    {
        return $this->createResponse($this->unserialize($serialized), $messageFactory);
    }
482783
protected function unserializeObject($value)
    {
        $className = $value[static::CLASS_IDENTIFIER_KEY];
        unset($value[static::CLASS_IDENTIFIER_KEY]);

        if ($className[0] === '@') {
            $index = substr($className, 1);
            return $this->objectMapping[$index];
        }

        if (array_key_exists($className, $this->customObjectSerializerMap)) {
            $obj = $this->customObjectSerializerMap[$className]->unserialize($value);
            $this->objectMapping[$this->objectMappingIndex++] = $obj;
            return $obj;
        }

        if (!class_exists($className)) {
            throw new JsonSerializerException('Unable to find class ' . $className);
        }

        if ($className === 'DateTime') {
            $obj = $this->restoreUsingUnserialize($className, $value);
            $this->objectMapping[$this->objectMappingIndex++] = $obj;
            return $obj;
        }

        if (!$this->isSplList($className)) {
            $ref = new ReflectionClass($className);
            $obj = $ref->newInstanceWithoutConstructor();
        } else {
            $obj = new $className();
        }

        if ($obj instanceof \SplDoublyLinkedList) {
            $obj->unserialize($value['value']);
            $this->objectMapping[$this->objectMappingIndex++] = $obj;
            return $obj;
        }

        $this->objectMapping[$this->objectMappingIndex++] = $obj;
        foreach ($value as $property => $propertyValue) {
            try {
                $propRef = $ref->getProperty($property);
                $propRef->setAccessible(true);
                $propRef->setValue($obj, $this->unserializeData($propertyValue));
            } catch (ReflectionException $e) {
                switch ($this->undefinedAttributeMode) {
                    case static::UNDECLARED_PROPERTY_MODE_SET:
                        $obj->$property = $this->unserializeData($propertyValue);
                        break;
                    case static::UNDECLARED_PROPERTY_MODE_IGNORE:
                        break;
                    case static::UNDECLARED_PROPERTY_MODE_EXCEPTION:
                        throw new JsonSerializerException('Undefined attribute detected during unserialization');
                        break;
                }
            }
        }
        if (method_exists($obj, '__wakeup')) {
            $obj->__wakeup();
        }
        return $obj;
    }
1068419
public function unserialize($serialized)
    {
        $args = [$serialized];
        $methodName = __FUNCTION__;

        return $this->findAndCall($methodName, $args);
    }
344137
public function jsonSerialize()
    {
        $jsonArray = $this->getArrayCopy();
        unset($jsonArray['inputFilter']);
        unset($jsonArray['__initializer__']);
        unset($jsonArray['__cloner__']);
        unset($jsonArray['__isInitialized__']);
        unset($jsonArray['game']);
        unset($jsonArray['cards']);
        unset($jsonArray['distribution']);
        unset($jsonArray['createdAt']);
        unset($jsonArray['updatedAt']);

        return $jsonArray;
    }
226798
private function unserialize(string $data)
    {
        $value = unserialize($data);

        if ($this->packer !== null) {
            return $this->packer->unpack($value);
        }

        return $value;
    }
1295699
protected static function unserialize($value)
    {
        @trigger_error(sprintf('The "%s::unserialize()" method is deprecated since Symfony 4.2, use DefaultMarshaller instead.', __CLASS__), E_USER_DEPRECATED);

        if ('b:0;' === $value) {
            return false;
        }
        $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback');
        try {
            if (false !== $value = unserialize($value)) {
                return $value;
            }
            throw new \DomainException('Failed to unserialize cached value');
        } catch (\Error $e) {
            throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
        } finally {
            ini_set('unserialize_callback_func', $unserializeCallbackHandler);
        }
    }
1041142
public function serialize()
    {
        if ($this->response) {
            return serialize((string) $this->response->getBody());
        }

        return serialize(null);
    }
1258603
public function unserialize($serialized)
    {
        $identifier = __CLASS__ . '@';

        if (substr($serialized, 0, strlen($identifier)) !== $identifier) {
            $message = sprintf('Serialized value doesn\'t represents an instance.of "%s".', __CLASS__);
            throw new Exception\InvalidArgumentException($message);
        }

        $collection = unserialize(substr($serialized, strlen($identifier)));

        if (!is_array($collection)) {
            $type = is_object($collection) ? get_class($collection) : gettype($collection);
            $message = sprintf('Unserialized value in "%s" must be an array; "%s" was given.', __METHOD__, $type);
            throw new Exception\InvalidArgumentException($message);
        }

        $this->collection = $collection;
        return $this;
    }
27395
protected function unserializeData($value)
    {
        if ($value === null || !is_array($value)) {
            return $value;
        }

        if (isset($value[self::MAP_TYPE]) && !isset($value[self::CLASS_IDENTIFIER_KEY])) {
            $value = $value[self::SCALAR_VALUE];

            return $this->unserializeData($value);
        }

        if (isset($value[self::SCALAR_TYPE])) {
            return $this->getScalarValue($value);
        }

        if (isset($value[self::CLASS_PARENT_KEY]) && 0 === strcmp($value[self::CLASS_PARENT_KEY], 'SplFixedArray')) {
            return SplFixedArraySerializer::unserialize($this, $value[self::CLASS_IDENTIFIER_KEY], $value);
        }

        if (isset($value[self::CLASS_IDENTIFIER_KEY])) {
            return $this->unserializeObject($value);
        }

        return \array_map([$this, __FUNCTION__], $value);
    }
778883
protected static function unserialize($string)
    {
        if (is_array($string)) {
            return $string;
        }

        if (($data = unserialize($string)) !== false) {
            return $data;
        }

        return unserialize(stripslashes($string));
    }
1219407
public function deserialize(): object
    {
        $this->buffer->position($this->assetOffset / 2);

        $this->transaction->amount = $this->buffer->readUInt64();
        $this->transaction->expiration = $this->buffer->readUInt32();
        $this->transaction->recipientId = Base58::encodeCheck(new Buffer(hex2bin($this->buffer->readHex(21))));

        return $this->parseSignatures($this->assetOffset + (8 + 4 + 21) * 2);
    }
1257130
public function deserialize(): object
    {
        $this->buffer->position($this->assetOffset / 2);

        $usernameLength = $this->buffer->readUInt8();

        $this->transaction->asset = [
            'delegate' => [
                'username' => $this->buffer->position($this->assetOffset + 2)->readHexBytes($usernameLength * 2),
            ],
        ];

        return $this->parseSignatures($this->assetOffset + ($usernameLength + 1) * 2);
    }
912576
protected function _unserialize($input)
	{
		$data = @unserialize($input);

		if (is_array($data))
		{
			foreach ($data as $key => $val)
			{
				if (is_string($val))
				{
					$data[$key] = str_replace('{{slash}}', '\\', $val);
				}
			}

			return $data;
		}

		elseif ($data === false)
		{
			is_string($input) and $data = array($input);
		}

		return (is_string($data)) ? str_replace('{{slash}}', '\\', $data) : $data;
	}
235889
public function unserialize($serialized) // [\SplDoublyLinkedList]
	{
		try
		{
			if(null === $this->last)
			{
				$this->first = unserialize($serialized);
			}
			else
			{
				$this->last->next = unserialize($serialized);
			}
		}
		catch(\Exception $e)
		{
			$error = $e->getMessage();
			
			throw new UnserializeException(substr($error, strpos($error, ': ') + 2));
		}
		
		$n    = 0;
		$iter = $this->first;
		$last = null;
		
		while(null !== $iter)
		{
			$last = $iter;
			$iter = $iter->next;
			++$n;
		}
		
		$this->last = $last;
		$this->size = $n;
	}
538800
protected function unserializeResponse($serialized)
    {
        $array = unserialize($serialized);
        if (!is_array($array) || 3 !== count($array)) {
            throw new Exception(sprintf('Error unserializing response: %s', $serialized));
        }

        return new Response($array[0], $array[1], $array[2]);
    }
741575
public function unserializeData($value)
    {
        if (\is_array($value)) {
            return $value;
        }

        if (0 === strpos($value, 'a:')) {
            return \unserialize($value, ['allowed_classes' => false]);
        }

        return $value;
    }