code: public function serializeReturnValue($type, $value)
      {
          $jobType = $this->registry->get($type);
  
          return $this->serializer->serialize($value, 'json', $this->getResponseSerializationContext($jobType));
      }
docs: Serializes the return value of a job.
  
  @param string $type The job type
  @param mixed  $value
  @return string