protected function normalizeObject($object, $format, array $context)
    {
        if (!$this->serializer instanceof NormalizerInterface) {
            throw new LogicException(
                'Cannot normalize object because the injected serializer is not a normalizer'
            );
        }

        return $this->serializer->normalize($object, $format, $context);
    }