`protobuf-js' is a Protocol Buffers encoder/decoder for Javascript.
Questions tagged [protobuf.js]
108 questions
0
votes
1 answer
How to have standard serialization output between GO and JS with regards to default values?
I take a piece of data and put it in a protobuf in both GO and JS and then encode the PB on each platform and the resulting serialized values differ. Since we use the encoded value for signing and hashing, it's critical they match. From what I could…

robmisio
- 1,066
- 2
- 12
- 20
0
votes
1 answer
How can I use Protobuf in NativeScript?
I would like to use protobuf in a NativeScript app, however I'm struggling to figure out how, as it seems like NativeScript doesn't support binary over the wire.
I know NativeScript apps can use protobuf, because I'm pretty sure the…

rynop
- 50,086
- 26
- 101
- 112
0
votes
1 answer
How I can encode with Protobuf a Cypress stub response?
I have some fixtures to stub a server that encode the messages with protobuf (I'm using protobufjs). I'd like to have the fixtures decoded to easily manipulate them and let Cypress encode the stub body before sending the response to the client, how…

NoriSte
- 3,589
- 1
- 19
- 18
0
votes
1 answer
How to dynamically create gRPC proto schema in nodejs?
Loading .proto files can be done by providing file path (PROTO_PATH)
var packageDefinition = protoLoader.loadSync(
PROTO_PATH,
{keepCase: true,
longs: String,
enums: String,
defaults: true,
oneofs: true
});
How to do…

npr
- 4,325
- 4
- 20
- 30
0
votes
1 answer
Nodejs Date object to protobuf
I am building a graphql integrated with protobuf. I have an gql schema like:
type User {
userId: ID!,
createTime: DateTime
}
The problem is how can i create an User message object by only the constructor? Be specify, I would want to…

Chris
- 47
- 6
0
votes
1 answer
OpenCV.js installation error:
I am trying to install opencv.js and I am following this instruction:
OpenCV Build
I have installed emsdk by following its instruction and I cloned the OpenCV from Github.
python ./platforms/js/build_js.py build_js
This command does not work. It…

tgbzkl
- 67
- 1
- 10
0
votes
1 answer
What problems am I likely to run into adapting writer.js to write to file instead of memory?
We are working with large (10MB+) protocol buffers and it seems like encoding is producing a ton of garbage. Ultimately I want to get the encoded protobuf onto disk, and I'm thinking I could avoid all of these list node allocations if I were to -…

corsair
- 347
- 3
- 13
0
votes
1 answer
Decode an array of messages in protobuf.js
In our node.js application we need to deserialize a Buffer which we know contains multiple objects. With protobuf-net this was done like so:
var stream = new MemoryStream(byteData);
List objects =…

Jordan H
- 52,571
- 37
- 201
- 351
0
votes
0 answers
Empty response while mapping array of objects to Protobuf using Node JS
Below is my sample API reponse which is an array of objects. I am trying to convert this response in protobuff using the below steps. But it is always giving me empty response.
[
{
travels: "Kallada Travels (Suresh Kallada)",
…

Shagun Pruthi
- 1,813
- 15
- 19
0
votes
1 answer
Protobuf not producing API I want
I'm trying to use protobufs to help serialize my data, however when I run the protobuf command on a .proto file, it doesn't provide me with the functions that it says it would,
namely serializeToString, and parseFromString.
Any idea why this is…
0
votes
1 answer
How to read protobuf object in angular4 received in response of an HTTP request
Trying to read protobuf object instead of JSON object in angular4.
I found this dcodeIO/protobufjs. But I don't understand how should I use this in my project?
I also tried installing the typings for protobufjs using typings install dt~protobufjs…

Vinayak Kore
- 11
- 4
0
votes
0 answers
Protobuf C# can't deserialize message from protobufjs
Im trying to deserialize a message which is getting posted by a script on a specific website. I have looked through the script and noticed that it uses protobufjs. The message structure is loaded from a JSON file from the server which looks like…

Bohnenbaum
- 1
- 1
- 2
0
votes
1 answer
Posting binary buffer payload using Node-RED
I am trying to send a byte array through POST using Node-RED. I can successfully create the buffer using this module and storing it in msg.payload. However I can't figure out how to add it as a parameter in a http request node.
The receiving…

Sjors Hijgenaar
- 1,232
- 1
- 16
- 30
0
votes
1 answer
protobuf.js reflection vs. static code
I can't figure out when it is better to use the approach of loading .proto files (Reflection) and when it is better to generate static code with the pbjs script/tool.
Method with Reflection:
protobuf.load("awesome.proto", function(err, root) {
…

Stefan Walter
- 94
- 10
0
votes
1 answer
Protobuf.js .toObject() with .NET types
I'm using a combination of protobuf-net (server) and protobuf.js (browser client).
I have a .proto like this:
package Testy;
import "bcl.proto"; // schema for protobuf-net's handling of core .NET types
message Foo {
optional int32 ID = 1…

Maitland Marshall
- 388
- 2
- 19