`protobuf-js' is a Protocol Buffers encoder/decoder for Javascript.
Questions tagged [protobuf.js]
108 questions
0
votes
0 answers
how can i convert timestamp object to protobuf timestamp object
The following is my firestore document. utc key in the object is Timestamp object.
{
exit: {
eventDateTime: {
utc: Timestamp { _seconds: 1653024600, _nanoseconds: 0 },
local: '2022-05-20T05:30:00+01:00'
},
_id:…

Vishal Singh
- 6,014
- 2
- 17
- 33
0
votes
1 answer
`Could not make proto path relative` for protoc.js
Question
In my C++ project, I use protobuf to generate some files with calling protobuf_generate_cpp cmake macro. The generate make file is like:
cd /Users/bob/code/cmake-build-debug/tools/converter/src &&…

Bob liao
- 569
- 4
- 15
0
votes
1 answer
protobuf.js using CommonJS?
I am relatively new to JS but very familiar with protobuf. I'm currently designing a web page hosted from a Java HTTP server, and would like to implement protobuf communication between them.
My issue is on the browser side. After some research I…

Kris Rice
- 559
- 1
- 5
- 23
0
votes
1 answer
Protobuf structure for a map where the value is an array of objects?
I am looking to encode a map like this in a protobuf:
const newVisMap = new Map();
The value is an array of objects that all have the same interface (with one optional entry):
interface IOutput {
glyph: string,
color:…

hipsterstomper69
- 317
- 1
- 6
- 19
0
votes
1 answer
How to read value of custom options from protobuf.js generated code?
Similar to the example at: https://developers.google.com/protocol-buffers/docs/proto#extensions
Suppose I have a proto like:
import "google/protobuf/descriptor.proto";
extend google.protobuf.FieldOptions {
string search_key = 7000;
}
message…

UnknownBeef
- 418
- 3
- 17
0
votes
2 answers
How to use protobufs in NodeJS?
I'm a NodeJS beginner and I'm trying to create a protobuf object in NodeJS but I don't seem to understand the concept yet.
The .proto file I'm working with is here:…

Stefan Gofferje
- 69
- 7
0
votes
1 answer
Writing characteristic failed error when writing to ESP32 GATT characteristic using protobufjs and ionic capacitor BLE plugin
Building Android app from Angular (using Ionic) to scan a BLE device (ESP32 chip) and write to its GATT characteristic. Using Capacitor BLE plug-in for BLE communication and protobufjs to create message (since ESP32 code uses Google's Protocol…

coder101
- 383
- 4
- 21
0
votes
1 answer
How to actually see protobuf passing some bytes across, either on the network or in a file?
I am new to protobuf and want to experiment with it, by passing some data over the network or in a file, such as
2-byte unsigned int: 15
2-byte unsigned int: 15 and -1
4-byte unsigned int: 256, and then a string "Peter"
4-byte unsigned int: 256, and…

nonopolarity
- 146,324
- 131
- 460
- 740
0
votes
1 answer
Trying to set protobuf Map entries in Typescript
I have the following protobuf message:
syntax = "proto3";
message MyMessage {
string id = 1;
map attributeChanges = 2;
}
In typescript I am trying to set the map entries of the protobuf message based on a typescript Map that looks…

user906573
- 644
- 1
- 6
- 22
0
votes
1 answer
How to force typescript to interpret a parameter as a namespace rather than a class, when they have the same name - gRPC
Sorry for the long title...
I am implementing a simple crud little system with gRPC and typescript, my problem is: The auto generated file creates a class and a type for each parameter in my protoFile, for instance: UserId parameter generates a…

Felipe Oliveira
- 156
- 2
- 12
0
votes
0 answers
How to connect protobuf.js from nodejs to client?
I got a problem that I'm not able to understand how to connect node.js backend API with Front-end application written in Angular. Can anyone help me with it?
I don't understand how should I write data with protobuf.js and consume it at the client…

Restir
- 129
- 4
- 12
0
votes
0 answers
Wrong typescript generated file
The typescript generated file is no more valid
The enums are generated into a namespace
And the interface are no more included
I am using typescript 6.8.9 but I think it is a dependancy issue.
Are you also experiencing this issue ?

rems
- 1
0
votes
1 answer
Protobuf encode returns null values
I am trying to encode a message to a Buffer using the encode method in protobufjs.
this is my code.
setValue(value) {
var address = makeAddress(value);
let data = protobuf["Icao"].create({data:value})
let container =…

pavithra rox
- 1,056
- 3
- 11
- 33
0
votes
1 answer
using promises and async for protobufjs loadcall
I am trying to figure out the best way to re-write the following code:
var api = function(id, contract) {
var callback = function (error, root) {
if (error)
throw error;
var by = Buffer.from(contract,'base64')
var es =…

XnaijaZ
- 59
- 1
- 2
- 10
0
votes
1 answer
Protobuf with Angular 2.0 and asp.net core(webpack) and Typescript
protobuf.js version: "protobufjs": "6.8.8",
i am new to protobufjs and planning to implement the protobufjs in Angular 2 project.
I have installed the protobufjs using the "npm install protobufjs --save" inside the Angular 2 project(VS2015).
i have…

Vanu
- 63
- 1
- 12