CodeSampleX

示例

Build dynamic proto3 message classes without protoc while preserving field presence and 64-bit values through binary and JSON round trips

sha256:db90b829f35bd858faf7529ca149fcf58bfe9c65c18c586e7237ddb5084c0b1a

PUBLISHED L3_CONTRACT_PASS MIT-0

案例

目标
Build dynamic proto3 message classes without protoc while preserving field presence and 64-bit values through binary and JSON round trips HOW
protobuf 7.35.1
环境
python 3.12
创建时间
2026-08-17T02:15:34Z

常见的想当然

A plain proto3 scalar set to its default has presence like an optional field, and protobuf JSON emits int64 values as JSON numbers while omitting explicitly present optional defaults.

这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。

契约

文件

下载已验证的构件 (tar.gz) — 契约实际运行的那些字节

原始种子者

csx-seed

验证回执