mirror of
https://github.com/firebase/nanopb
synced 2026-11-11 22:45:58 +05:45
This will be a breaking change for a lot of code using proto3 mode. All proto3 submessages now have has_ field, that must be set to 'true' to have the field encoded. To ease the transition, there is a generator option proto3_singular_msgs to restore the old behavior.
12 lines
219 B
Protocol Buffer
12 lines
219 B
Protocol Buffer
syntax = "proto3";
|
|
import "nanopb.proto";
|
|
|
|
message SubMessage {
|
|
repeated uint32 rep_uint32 = 1 [(nanopb).max_count = 3];
|
|
}
|
|
|
|
message TestMessage {
|
|
SubMessage submsg = 1 [(nanopb).proto3_singular_msgs = true];
|
|
}
|
|
|