Protocol Buffer Types: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Tag: Manual revert
Line 2: Line 2:
* [[Protocol_Buffer_Concepts#Field_Types|Protocol Buffer Concepts]]
* [[Protocol_Buffer_Concepts#Field_Types|Protocol Buffer Concepts]]
=Overview=
=Overview=
=String=
<syntaxhighlight lang='protobuf'>
string some_string = 1;
</syntaxhighlight>
The default value is empty string (<code>""</code>). The field contains [[Character_Encoding#UTF-8|UTF-8]] encoded or 7-bit ASCII text.
=Boolean=
<syntaxhighlight lang='protobuf'>
bool some_bool = 1;
</syntaxhighlight>
The default value is <code>false</code>.


=Scalar Number Types=
=Scalar Number Types=

Revision as of 23:52, 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

uint32

sint32

fixed32

sfixed32

int64

uint64

sint64

fixed64

sfixed64

float

double