SchulIT/idp-exchange · Client.php
php logo
private function deserialize(string $json, string $type) {
        $context = (new DeserializationContext())
            ->setSerializeNull(true);

        $object = $this->serializer->deserialize($json, $type, 'json', $context);
        return $object;
    }
Similar code snippets
1.
aboutcoders/job-bundle · Serializer.php
Match rating: 74.96% · See similar code snippets
php logo
public function deserialize($data, $type, $format, DeserializationContext $context = null)
    {
        return $this->serializer->deserialize($data, $type, $format, $context);
    }
2.
martyn82/apha · JsonSerializer.php
Match rating: 72.66% · See similar code snippets
php logo
public function deserialize(string $data, string $type)
    {
        return $this->serializer->deserialize($data, $type, 'json');
    }
3.
FriendsOfSymfony/FOSRestBundle · JMSSerializerAdapter.php
Match rating: 70.31% · See similar code snippets
php logo
public function deserialize($data, $type, $format, Context $context)
    {
        $context = $this->convertContext($context, self::DESERIALIZATION);

        return $this->serializer->deserialize($data, $type, $format, $context);
    }
4.
martyn82/apha · SagaSerializer.php
Match rating: 68.96% · 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;
    }
5.
pauci/cqrs · JmsSerializer.php
Match rating: 68.6% · See similar code snippets
php logo
public function deserialize($data, $type)
    {
        return $this->serializer->deserialize($data, $type, $this->format);
    }
6.
hellofresh/engine · JmsSerializerAdapter.php
Match rating: 67.85% · See similar code snippets
php logo
public function deserialize($data, $type, $format, $groups = null)
    {
        $context = null;

        if ($groups) {
            $context = DeserializationContext::create()->setGroups($groups);
        }

        return $this->serializer->deserialize($data, $type, $format, $context);
    }
7.
maximegosselin/serializer · ArrayDeserializeStrategy.php
Match rating: 65.36% · 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.
Match rating: 64.87% · See similar code snippets
php logo
private function deserializeData($data)
    {
        $result = $this->get('jms_serializer')->deserialize(
            $data,
            $this->getTargetGroupRepository()->getClassName(),
            'json',
            DeserializationContext::create()
                ->setSerializeNull(true)
        );

        return $result;
    }
9.
Match rating: 64.55% · See similar code snippets
php logo
public function deserialize($serializedObject, $objectClass)
    {
        return $this->serializer->deserialize(
            $serializedObject,
            $objectClass,
            'json',
            DeserializationContext::create()->setSerializeNull(true)->setGroups(['preview'])
        );
    }
10.
alekitto/serializer · Serializer.php
Match rating: 64.55% · See similar code snippets
php logo
public function denormalize(array $data, Type $type, DeserializationContext $context = null)
    {
        return $this->deserialize($data, $type, 'array', $context);
    }