Questions tagged [proto3]

Protocol Buffers - Google's data interchange format

Google Protocol Buffers questions related to version 3 of the Protocol Buffer format should be tagged with this tag.

At this time proto3 is still in alpha stage.

About Versioning

When protobuf was initially opensourced it implemented Protocol Buffers language version 2 (aka proto2), which is why the version number started from v2.0.0. From v3.0.0, a new language version (proto3) is introduced while the old version (proto2) will continue to be supported.

146 questions
0
votes
1 answer

How to create a protocol buffer for a client server in ballerina?

We wish to build a repository of functions that a developer can assemble to build a complex program. There can exist several versions of a function, each with its metadata. This, function metadata includes the …
Peter
  • 1
  • 3
0
votes
2 answers

How to get a list of methods from a particular gRPC service in C++?

I have a proto3 gRPC service with these methods: syntax = "proto3"; Service MyService { rpc Foo (FooRequest) returns (FooResponse) {} rpc Bar (BarRequest) returns (BarResponse) {} // etc. } I would like to access these methods…
Harry Williams
  • 310
  • 3
  • 11
0
votes
0 answers

grpcurl to send a message of type 'Any'

How to send a message of type 'Any' using grpcurl? I have this proto: message MyRequest { string request_id = 1; repeated google.protobuf.Any payload = 2; } I am sending this request: { "request_id":"1", "payload":[ { …
Olga
  • 309
  • 4
  • 16
0
votes
1 answer

Where is the canonical specification for proto3 that allows JavaScript-like object assignment to an option?

In the Protocol Buffers Version 3 Language Specification The EBNF syntax for an option is option = "option" optionName "=" constant ";" optionName = ( ident | "(" fullIdent ")" ) { "." ident } constant = fullIdent | ( [ "-" | "+" ] intLit ) | ( […
Jeff
  • 2,095
  • 25
  • 18
0
votes
0 answers

How I can convert this c# class to brotobuf in proto3 version?

I have the following class in my OperationResult.Cs public class OperationResult { public bool Result { get; set; } public string Message { get; set; } public string ErrorMessage { get; set; } } public class…
Adnan
  • 95
  • 1
  • 6
0
votes
1 answer

Python pb3 serialization using pb3

I am using pb3 for serialization: syntax = "proto3"; package marshalling; import "google/protobuf/timestamp.proto"; message PrimitiveType { oneof primitive_value { bool boolean_value = 1; int64 int_value = 2; double double_value =…
Sidi Chang
  • 25
  • 6
0
votes
1 answer

gRPC Protobuf's Timestamp.FromDateTime() returns null on PHP

I cant get my head around what I am doing wrong here. use Google\Protobuf\Timestamp; $timestamp = new Timestamp(); $dt = Carbon::now(); $pt = $timestamp->fromDateTime($dt); Carbon is a simple PHP API extension for DateTime so it should work but…
Lloen
  • 68
  • 4
  • 11
0
votes
2 answers

proto3 message type for json marshal data

I am implementing a gRPC API and wanted to add JSON body data as it is in response. so I have tried: type Message struct { Subject string `json:"subject"` Body interface{} `json:"body"` } proto3 message Message { string subject =…
Vivek Singh
  • 625
  • 8
  • 15
0
votes
1 answer

Problems with repeated field in Protobuf. What is a better way to use the repeated field for serialization/deserialization?

Consider the following sensor.proto file that makes use of the repeated field to initialize multiple messages. syntax = "proto3"; package HUBSensors; message Device { string name = 1; int32 id = 2; message Sensor { string name…
bad_locality
  • 135
  • 2
  • 12
0
votes
0 answers

I want to copy all ".proto" files from one directory to another directory when i perform 'Build>Clean solution']

I am working with .proto files(Proto3) and I want to copy all the .proto files from one directory(Outside project) to another directory(Inside VS project) when i perform Build>Clean solution. Thanks in advance. I tried to modify "Visual C# Project…
0
votes
0 answers

proto2 can not read proto3 messages

We have decided to upgrade to proto3 but will still have to be able to communicate with devices running proto2 for a while. Now we are facing some problems with some messages that they cannot be deserialized on the proto2 side due to the required…
0
votes
1 answer

Support multiple schemas in Proto3

I am creating a proto3 schema that allow multiple/arbitrary data in incoming jsonObject. I would like to convert the incoming json object in one shot. for example {"key1":"value", "key2": { //schema A} } I also want to support for schema B for…
bj4947
  • 880
  • 11
  • 32
0
votes
1 answer

Long values in objects not serialized and deserialized properly when using proto3 in Java

I am trying to serialize and deserialize an object in java using proto3. Here is what my object in proto looks like option java_multiple_files = true; option java_package = "com.project.dataModel"; option java_outer_classname = "FlowProto"; // The…
Abdul Rahman
  • 1,294
  • 22
  • 41
0
votes
0 answers

C macro for protobuf message comparison

My goal is to compare some fields in protobuf messages. I have tried MessageDifferencer, but I don't want to use reflection. I'm using protobuf 3.4.0. Time variables are stored in protobuf's well-known types like google.protobuf.Duration and…
Jónás Balázs
  • 781
  • 10
  • 24
0
votes
1 answer

Protobuf lazy decoding of sub message

I am using proto 3 (java) in my projects . I have some huge protobufs embedded with smaller messages . Is there a way I can acheive partial decoding of only few nested sub messages that I want to look at. The current issue I am having is I need to…
user179156
  • 841
  • 9
  • 31
1 2 3
9
10