Protocol Buffer Types: Difference between revisions
Jump to navigation
Jump to search
(→int32) |
|||
(One intermediate revision by the same user not shown) | |||
Line 16: | Line 16: | ||
=Scalar Number Types= | =Scalar Number Types= | ||
==<tt>int32</tt>== | ==<tt>int32</tt>== | ||
<syntaxhighlight lang='protobuf'> | |||
int32 some_int = 1; | |||
</syntaxhighlight> | |||
==<tt>uint32</tt>== | ==<tt>uint32</tt>== | ||
==<tt>sint32</tt>== | ==<tt>sint32</tt>== | ||
Line 28: | Line 32: | ||
==<tt>double</tt>== | ==<tt>double</tt>== | ||
=Bytes= | =Bytes= | ||
<syntaxhighlight lang='protobuf'> | |||
bytes some_bytes = 1; | |||
</syntaxhighlight> |
Revision as of 23:54, 6 May 2024
Internal
Overview
String
string some_string = 1;
The default value is empty string (""
). The field contains UTF-8 encoded or 7-bit ASCII text.
Boolean
bool some_bool = 1;
The default value is false
.
Scalar Number Types
int32
int32 some_int = 1;
uint32
sint32
fixed32
sfixed32
int64
uint64
sint64
fixed64
sfixed64
float
double
Bytes
bytes some_bytes = 1;