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

検証レシート