Related to Google Protocol Buffers, borrows its name from the .proto file extension containing a protocol schema.
Questions tagged [proto]
564 questions
6
votes
2 answers
How to save a list of objects with Proto DataStore
If I have the following class, how can I save a list of it with Proto DataStore?
data class Tag(
val id: int,
val name: String
)
All guides that I saw were teaching how to save only a single object. Is it possible to have a list of it?

Guilherme Oliveira
- 916
- 1
- 11
- 21
6
votes
2 answers
Removing a field in protobuf
I have a protobuf message like this:
message MyMessage{
string foo = 1;
int toBeRemovedBar = 2 [deprecated = true];
string zag = 3;
}
toBeRemovedBar attribute is no longer required and needs to be removed.
As per the guidelines here and…

Sarvesh
- 519
- 1
- 8
- 16
6
votes
1 answer
How does the prototype object of an inherited class equal a new instance of the original class in JavaScript?
I have been learning about inheritance in JavaScript, and could not understand a line of code in the tutorial at https://www.tutorialsteacher.com/javascript/inheritance-in-javascript.
The code is as follows:
function Person(firstName, lastName) {
…

Joon K
- 161
- 1
- 9
6
votes
3 answers
How to get type contained by protobuf's RepeatedCompositeContainer or RepeatedScalarContainer in python3?
I'm writing a Python app for serializing and sending protobuf3 messages. I'd like to make some sort of interactive UI that allows to choose a message and assign it on the fly. I've got a pretty big set of those messages, thus I don't want to make a…

Franciszek Malinka
- 83
- 1
- 6
6
votes
0 answers
Jest mock testing with protobuf
I am curious if there are testing examples using jest, using dynamically generated node clients in build/protobuf
I am implementing a node client which dynamically generate protobuf files of the service it is calling, and calls the service via grpc.…

Hao Wang
- 61
- 1
6
votes
1 answer
Proto Descriptor from .proto schema file or String
I would like to get a proto Descriptor from a string that defines the message protocol. For example I have:
public final static String schema = ""
+ "message Person {\n"
+ " required string id = 1;\n"
+ " required string name =…

Mike Samaras
- 376
- 2
- 13
6
votes
1 answer
Protocal buffers aren't generating service stubs
I'm having some trouble generating stubs from my .proto file in GRPC. Here's what the .proto file looks like
`syntax = "proto3";`
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns…
user6088291
6
votes
2 answers
Exporting an environment from an R package
I am developing an R package that wraps the rmongodb package and creates a developer-friendly interface for working with MongoDB. The package uses proto internally.
I'd like to export a single factory method via a proto object (an environment)…

Sim
- 13,147
- 9
- 66
- 95
6
votes
2 answers
R: caching/memoise for environments
nI would like to use memoization to cache the results of certain expensive operations so that they are not computed over and over again.
Both memoise and R.cache fit my needs. However, I am finding that caching is not robust across calls.
Here is…

Sim
- 13,147
- 9
- 66
- 95
5
votes
0 answers
Does MessageDifferencer on proto messages handles map?
I have to check the differences between the two protobuf messages for my program(C++). I am trying MessageDifferencer::Compare and MessageDifferencer::Equals for this.
I have a map field inside the proto message, which as we know is not guaranteed…

DonBaka
- 325
- 2
- 14
5
votes
1 answer
Invalid Protocol Buffer schema. Import "google/protobuf/any.proto" has not been loaded: GCP/Pub-Sub
I am new to GCP. I am trying to use Pub/Sub service with schema definition using protobuf.
Schema:
syntax = "proto3";
import "google/protobuf/any.proto";
message Endorsement {
string endorserId=1;
google.protobuf.Any data = 2;
string…

Nitish Bhardwaj
- 1,113
- 12
- 29
5
votes
3 answers
IntelliJ IDEA doesn't see classes generated from protobuf files in a subproject
I have a Gradle project with modules. moduleA contains only protobuf files and produces a jar file with classes generated from the .proto files. moduleB depends on the moduleA (implementation project(':moduleA')).
moduleA
│ build.gradle
│ src
│ …

Sasha Shpota
- 9,436
- 14
- 75
- 148
5
votes
1 answer
TypeError during the call python grpc method without arguments using google/protobuf/empty.proto
I have a proto scheme like this:
import "google/protobuf/empty.proto";
...
service NodeInfoService {
rpc NodeConfig (google.protobuf.Empty) returns (NodeConfigResponse);
}
Using grpc_tools I got classes and now, when I'm trying to send…

liliya
- 251
- 3
- 6
5
votes
1 answer
How to curl a POST endpoint with a protobuf payload
I have a POST endpoint in my Java service that expects a protobuf 3 payload. This service is used by other services which send the protobuf payload. I would like to do some debugging and send a protobuf payload to the service via a curl command,…

user4184113
- 976
- 2
- 11
- 29
5
votes
1 answer
Cannot Find Solutions to a Protobuf Unmarshal Error
I'm getting the following error "unmarshaling error: proto: cannot parse reserved wire type" while unmarshaling a binary protobuf message.
newMessage := &MessageName{}
err = proto.Unmarshal(data, newMessage)
Here for data I'm reading from Protobuf…

sxp
- 193
- 1
- 1
- 11