code: public function serialize(Message $message, array $options = [])
      {
          if (isset($options['json_encode_options'])) {
              return json_encode(parent::serialize($message, $options), $options['json_encode_options']);
          }
  
          return json_encode(parent::serialize($message, $options));
      }
docs: {@inheritdoc}