final public function Serializer::deserialize

Deserializes data into the given type.

Parameters

mixed $data:

string $type:

string $format:

array $context:

Return value

object

Overrides SerializerInterface::deserialize

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php, line 91

Class

Serializer
Serializer serializes and deserializes data

Namespace

Symfony\Component\Serializer

Code

public final function deserialize($data, $type, $format, array $context = array()) {
  if (!$this
    ->supportsDecoding($format)) {
    throw new UnexpectedValueException(sprintf('Deserialization for the format %s is not supported', $format));
  }
  $data = $this
    ->decode($data, $format, $context);
  return $this
    ->denormalize($data, $type, $format, $context);
}