public static function deserialize(string $json)
    {
        $deserialized = json_decode($json, true);
        $objects = [];

        return self::decode($deserialized, $objects);
    }
Similar code snippets
1.
sergey-shandar/restapi-core-php-poc · TypeInfo.php
Match rating: 68.85% · See similar code snippets
php logo
public function jsonDeserialize($json)
    {
        return $json === null ? null : $this->deserialize(Common::decode($json));
    }
2.
martyn82/apha · SagaSerializer.php
Match rating: 67.71% · See similar code snippets
php logo
public function deserialize(string $data, string $type)
    {
        /* @var $deserialized Saga */
        $deserialized = $this->serializer->deserialize($data, $type);
        $this->factory->hydrate($deserialized);
        return $deserialized;
    }
3.
chemisus/provider · JsonSerializer.php
Match rating: 66.62% · See similar code snippets
php logo
public function deserialize($string)
    {
        return json_decode($string, $this->deserializeAssoc, $this->deserializeDepth, $this->deserializeOptions);
    }
4.
mtils/php-ems · JsonSerializer.php
Match rating: 66.16% · See similar code snippets
php logo
public function deserialize($string, array $options=[])
    {
        $deserialized = json_decode(
            $string,
            $this->shouldDecodeAsArray($options),
            $this->getDepth($options),
            $this->bitmask($options, true)
        );

        return $deserialized;

    }
5.
issei-m/simple-job-queue · Queue.php
Match rating: 65.06% · See similar code snippets
php logo
public function dequeue(): ?Job
    {
        $this->checkDelayed();

        $deserialized = $this->redis->lpop($this->key);
        if (null === $deserialized) {
            return null;
        }

        return $this->serializer->deserialize(\json_decode($deserialized, true));
    }
6.
SchulIT/idp-exchange · Client.php
Match rating: 64.57% · See similar code snippets
php logo
private function deserialize(string $json, string $type) {
        $context = (new DeserializationContext())
            ->setSerializeNull(true);

        $object = $this->serializer->deserialize($json, $type, 'json', $context);
        return $object;
    }
7.
maximegosselin/serializer · ArrayDeserializeStrategy.php
Match rating: 62.58% · See similar code snippets
php logo
public function deserialize(array $data)
    {
        $this->assertValidData($data);

        $payload = $data['payload'];
        $deserializer = $this->deserializer;
        array_walk($payload, function (&$value) use ($deserializer) {
            $value = $deserializer->deserialize($value);
        });

        return $payload;
    }
8.
rafrsr/generic-api · JsonMessageParser.php
Match rating: 62.55% · See similar code snippets
php logo
public function parse(MessageInterface $message)
    {
        if ($deserialized = $this->deserialize($message, 'json')) {
            return $deserialized;
        } else {
            return json_decode($message->getBody()->getContents());
        }
    }
9.
infomaniac-amf/php · AMF.php
Match rating: 62.11% · See similar code snippets
php logo
public static function deserialize($data, $forceType = null)
    {
        try {
            self::init();

            $stream       = new Input($data);
            $deserializer = new Deserializer($stream);

            return $deserializer->deserialize($forceType);
        } catch (Exception $e) {
            $ex = new DeserializationException($e->getMessage(), $e->getCode(), $e);
            $ex->setData($data);
            throw $ex;
        }
    }
10.
giftcards/Encryption · ChainSerializerDeserializer.php
Match rating: 61.54% · See similar code snippets
php logo
public function deserialize($string)
    {
        $this->sortDeserializers();
        foreach ($this->sortedDeserializers as $serializer) {
            if ($serializer->canDeserialize($string)) {
                return $serializer->deserialize($string);
            }
        }

        throw new FailedToDeserializeException($string);
    }