protocolbuffers / protocolbuffers/protocolbuffers.github.io

Encoding Repeated Elements Discussion Wrong

未关闭
#293 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
HTML
星标
69
派生
179
PR 合并指标
30 天内没有已合并 PR

描述

I'm brand new to Protobuf, so maybe I have this all wrong, but as best as I could make out, including by experimentation using protoc, the documentation on the encoding of repeated elements is wrong.

It says that if we "construct a Test4 message with d set to "hello", and e set to 1, 2, and 3, this could be encoded as 3206038e029ea705, or written out as Protoscope:"

4: {"hello"}
6: {3 270 86942}

First, the encoding given appears to be just for the values of e, not for the entire Test4 message.
Second, it appears the encoding is for e being set to 3, 270, and 86942, not 1, 2, and 3.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

找到包含所引用的 Test4 和 repeated-elements 示例的文档,然后按照 issue 中的描述使用 protoc 重现该示例。验证字节序列和 Protoscope 值是否与所述消息匹配,并更新示例和说明文字,使它们保持一致。

由索引模型根据 Issue 内容生成。

评估

领域
documentation
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。