function Serializer::denormalize

Same name in other branches
  1. 9 core/modules/jsonapi/src/Serializer/Serializer.php \Drupal\jsonapi\Serializer\Serializer::denormalize()
  2. 8.9.x core/modules/jsonapi/src/Serializer/Serializer.php \Drupal\jsonapi\Serializer\Serializer::denormalize()
  3. 10 core/modules/jsonapi/src/Serializer/Serializer.php \Drupal\jsonapi\Serializer\Serializer::denormalize()

File

core/modules/jsonapi/src/Serializer/Serializer.php, line 73

Class

Serializer
Overrides the Symfony serializer to cordon off our incompatible normalizers.

Namespace

Drupal\jsonapi\Serializer

Code

public function denormalize($data, $type, $format = NULL, array $context = []) : mixed {
    if ($this->selfSupportsDenormalization($data, $type, $format, $context)) {
        return parent::denormalize($data, $type, $format, $context);
    }
    return $this->fallbackNormalizer
        ->denormalize($data, $type, $format, $context);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.