File tree 2 files changed +12
-0
lines changed 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,12 @@ for a protocol buffer variable v:
101
101
with distinguished wrapper types for each possible field value.
102
102
- Marshal and Unmarshal are functions to encode and decode the wire format.
103
103
104
+ When the .proto file specifies ` syntax="proto3" ` , there are some differences:
105
+
106
+ - Non-repeated fields of non-message type are values instead of pointers.
107
+ - Getters are only generated for message and oneof fields.
108
+ - Enum types do not get an Enum method.
109
+
104
110
Consider file test.proto, containing
105
111
106
112
``` proto
Original file line number Diff line number Diff line change @@ -70,6 +70,12 @@ for a protocol buffer variable v:
70
70
with distinguished wrapper types for each possible field value.
71
71
- Marshal and Unmarshal are functions to encode and decode the wire format.
72
72
73
+ When the .proto file specifies `syntax="proto3"`, there are some differences:
74
+
75
+ - Non-repeated fields of non-message type are values instead of pointers.
76
+ - Getters are only generated for message and oneof fields.
77
+ - Enum types do not get an Enum method.
78
+
73
79
The simplest way to describe this is to see an example.
74
80
Given file test.proto, containing
75
81
You can’t perform that action at this time.
0 commit comments