• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/lib/protobuf/jsonresponse.php
  • Класс: BitrixPullProtobufJsonResponse
  • Вызов: JsonResponse::writeTo
public function writeTo(ProtobufWriteContext $context)
    {
        $stream      = $context->getStream();
        $writer      = $context->getWriter();
        $sizeContext = $context->getComputeSizeContext();

        if ($this->json !== null) {
            $writer->writeVarint($stream, 10);
            $writer->writeString($stream, $this->json);
        }

        if ($this->extensions !== null) {
            $this->extensions->writeTo($context);
        }

        return $stream;
    }