protected function denormalizeObject($data, $class, $format, array $context)
    {
        if (!$this->serializer instanceof DenormalizerInterface) {
            throw new LogicException(
                'Cannot denormalize object because the injected serializer is not a denormalizer'
            );
        }

        return $this->serializer->denormalize($data, $class, $format, $context);
    }