public function serializeReturnValue($type, $value)
    {
        $jobType = $this->registry->get($type);

        return $this->serializer->serialize($value, 'json', $this->getResponseSerializationContext($jobType));
    }