final public function Serializer::deserialize

Deserializes data into the given type.

Parameters

mixed $data:

string $type:

string $format:

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) {
  if (!$this
    ->supportsDecoding($format)) {
    throw new UnexpectedValueException('Deserialization for the format ' . $format . ' is not supported');
  }
  $data = $this
    ->decode($data, $format);
  return $this
    ->denormalize($data, $type, $format);
}