• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/lib/protobuf/jsonresponse.php
  • Класс: BitrixPullProtobufJsonResponse
  • Вызов: JsonResponse::serializedSize
public function serializedSize(ProtobufComputeSizeContext $context)
    {
        $calculator = $context->getSizeCalculator();
        $size       = 0;

        if ($this->json !== null) {
            $size += 1;
            $size += $calculator->computeStringSize($this->json);
        }

        if ($this->extensions !== null) {
            $size += $this->extensions->serializedSize($context);
        }

        return $size;
    }