[protobuf] What happend to the protobuf-javascript?

2023-10-09 Thread Joonsoo Jeon
Hi, I am looking for the official implementation of Protobuf for JavaScript(and TypeScript, if exists). protobuf-javascript <https://github.com/protocolbuffers/protobuf-javascript> seems like the official implementation, but it looks like it hasn't been updated for a while. The

[protobuf] Re: JavaScript generated code

2022-09-08 Thread Evgeniia T
thanks четверг, 8 сентября 2022 г. в 04:25:03 UTC+7, deanna...@google.com: > As announced in May > <https://developers.google.com/protocol-buffers/docs/news/2022-05-06>, > JavaScript protobufs are being decoupled from the main repository. Any > questions about JavaScript

[protobuf] Re: JavaScript generated code

2022-09-07 Thread 'Deanna Garcia' via Protocol Buffers
As announced in May <https://developers.google.com/protocol-buffers/docs/news/2022-05-06>, JavaScript protobufs are being decoupled from the main repository. Any questions about JavaScript should be directed to the JavaScript repository <https://github.com/protobufjs/protobuf.js/>

[protobuf] JavaScript generated code

2022-09-05 Thread Evgeniia T
Where is JavaScript tutorial? It was here before: https://developers.google.com/protocol-buffers/docs/reference/javascript-generated -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiv

Re: [protobuf] Re: Passing protobuf message from Javascript to C++ WebAssembly module

2022-02-19 Thread Csaba Szigeti
I found the solution. This stackoverflow post described a really similar issue, and it helped me to fix my parsing as well : https://stackoverflow.com/questions/68750875/protobuf-serialize-deserialize-c-to-js Here is my updated code, which works well : I had to update the Javascript side

Re: [protobuf] Re: Passing protobuf message from Javascript to C++ WebAssembly module

2022-02-18 Thread Csaba Szigeti
In case if I modify my code, so it is passing a simple string as logo, then I can successfully parse the protobuf message on the C++ side : ```javascript ... internal.setLogo("logo") ... ``` So I guess that the issue is with this field. The original string is a base64 encoded i

Re: [protobuf] Re: Passing protobuf message from Javascript to C++ WebAssembly module

2022-02-17 Thread 'Adam Cozzette' via Protocol Buffers
If only UTF-8 messages are being parsed successfully, then that sounds like a clue to me that you probably need to base64-encode the serialized message. I have only limited experience with JavaScript, but from what I understand, JavaScript strings can only represent Unicode and not raw binary data

[protobuf] Re: Passing protobuf message from Javascript to C++ WebAssembly module

2022-02-17 Thread Csaba Szigeti
I am really sorry. Posting again with correct formatting this time : I would like to pass a protobuf message from Javascript to a C++ WebAssembly module. I do receive, and can successfully parse the simpler protobuf messages on the C++ side, however, protobuf is failing to parse the less

[protobuf] Passing protobuf message from Javascript to C++ WebAssembly module

2022-02-17 Thread Csaba Szigeti
I would like to pass a protobuf message from Javascript to a C++ WebAssembly module. I do receive, and can successfully parse the simpler protobuf messages on the C++ side, however, protobuf is failing to parse the less-simple protobuf messages. Here is the code that I am using

[protobuf] Re: Diff and merge functionality in javascript

2022-01-24 Thread 'Deanna Garcia' via Protocol Buffers
Can you use MergeFrom ? On Tuesday, January 18, 2022 at 2:55:01 AM UTC-8 kzwe...@gmail.com wrote: > Hi, > > Is there a way to get a diff and merge that diff into an instance of

[protobuf] Diff and merge functionality in javascript

2022-01-18 Thread Koen
Hi, Is there a way to get a diff and merge that diff into an instance of a message? E.g. I saw there is a static method on Message class 'difference', that returns a new message instance with the fields of param2 that are not represented in param1. Any existing methods that can merge the diff?

[protobuf] Re: Javascript library: Serialization/ deserialization into bytes type gives wrong data

2021-05-10 Thread Ben B
Does anyone who uses or contributes to javascript + protobuf have any idea regarding my previous question? Thanks :) On Friday, 7 May 2021 at 19:59:10 UTC+1 Ben B wrote: > Dear Protobuf team, > > I was looking to serialize Float32's or Int16 (or other arbitrary data > type) so

[protobuf] Javascript library: Serialization/ deserialization into bytes type gives wrong data

2021-05-07 Thread Ben B
Dear Protobuf team, I was looking to serialize Float32's or Int16 (or other arbitrary data type) so I've decided to use the bytes type. Unfortunately, In Javascript, I've had to convert this data into UInt8 to serialize it. This wasn't too ergonomic because it involves using DataViews, because

[protobuf] JavaScript still supported?

2020-11-29 Thread Ottmar Zittlau
I'm trying to parse a protobuf-packet in the browser and while trying to get this working encountered several questions: 1. Is it possible to use protobuf without node and the closure library? 2. When I use the closure-builder to build a javascript-file that I can run in the browser I

[protobuf] Immediately Interview Senior JavaScript engineering with 10 Years of experience for my client in New York City . (100% interview with in 24/hr)

2020-09-09 Thread syed faheem
Hello Associates, Any available local consultants for Senior JavaScript engineering. I have an excellent project with my client at New York City (remote start, but will be working on-site with team Jan. 2021). Kindly share suitable profiles at *fah...@mirthconsulting.net* Job Title

[protobuf] Re: Javascript - where is google-protobuf.js

2020-07-10 Thread zad0m
; https://github.com/protocolbuffers/protobuf/tree/master/js > > I'm using the *CommonJS imports *instructions. > > I built my protobuf files using a docker image that contains the > Javascript plugin this way: > > docker run --rm --user "$(id -u):$(id -g)" -v $(pwd)

[protobuf] Javascript - where is google-protobuf.js

2020-07-09 Thread Michael Lum
Hi, I've searched for quite a while but I cannot find the file: *google-protobuf.js*. I followed this link: https://github.com/protocolbuffers/protobuf/tree/master/js I'm using the *CommonJS imports *instructions. I built my protobuf files using a docker image that contains the Javascript

[protobuf] How to encode messages with "map" using google-protobuf in JavaScript

2020-06-30 Thread Hee-Jung Chae
The proto file I defined is as follows. ``` syntax = "proto3"; package live; message Op{ string cmd = 1; bool rsp = 2; map args = 3; } ``` The above proto file was converted to javascript using PROTOC. And the converted file contains the following functions: ``` proto.live.O

[protobuf] Question: JavaScript Object Literals

2020-06-15 Thread Will Tatum
All, I'm just now starting to use protobuf by way of the support for grpc in NodeJS with TypeScript. One thing that stands out to me right away is that the syntax for initializing and "hydrating" messages is pretty clunky. Just a basic hello world operations has a lot of "ceremony" in order to

[protobuf] Using closure imports with javascript

2019-02-23 Thread Valentin Johansson
Greetings! I have setup a page with javascript that uses the closure imports. In the reference page of protocol buffers they talk about importing your generated statements using closure imports as follow: goog.require('proto.my.package.MyMessage'); var message = proto.my.package.MyMessage

Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-13 Thread Yaseen Khan
But that oneof says, only one field should be set at a time , and in my example I need all of my fields to be set. On 13-Feb-2018 23:49, "Adam Cozzette" wrote: > Oneof fields are great for representing that, though: https://developers. >

Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-13 Thread 'Adam Cozzette' via Protocol Buffers
Oneof fields are great for representing that, though: https://developers.google.com/protocol-buffers/docs/proto#oneof On Tue, Feb 13, 2018 at 10:15 AM, Yaseen Khan wrote: > But a single message can have various data types as seen in the example.. > The message Master

Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-13 Thread Yaseen Khan
But a single message can have various data types as seen in the example.. The message Master {..} On 13-Feb-2018 23:41, "Adam Cozzette" wrote: I mean to say just don't rely on the field names at all, and instead store all the information you need in the serialized message.

Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-13 Thread 'Adam Cozzette' via Protocol Buffers
I mean to say just don't rely on the field names at all, and instead store all the information you need in the serialized message. For example, your serialized message could store a map that maps the string property name to another message called DataType describing the kind of

Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-13 Thread Yaseen Khan
I'm sorry I don't understand. How would you serialise the field names? On 13-Feb-2018 23:32, "Adam Cozzette" wrote: > Ah, I see. I would try to find a way to do this without trying to rely on > reflection, perhaps by serializing the names you need inside a proto > message

Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-13 Thread 'Adam Cozzette' via Protocol Buffers
Ah, I see. I would try to find a way to do this without trying to rely on reflection, perhaps by serializing the names you need inside a proto message without using the actual field names. On Tue, Feb 13, 2018 at 9:28 AM, Yaseen Khan wrote: > A dynamic form needs keys

Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-13 Thread Yaseen Khan
A dynamic form needs keys and values(if any) to be fed to it to create a form. I was thinking I could get the names of the properties in a msg with a descriptor and feeding it to create a dynamic form. Although a crude way of doing it is converting the jspb proto object to a normal Object and

Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-13 Thread 'Adam Cozzette' via Protocol Buffers
But ordinarily you parse messages without needing any descriptors--why do need a descriptor to read your message? On Tue, Feb 13, 2018 at 9:20 AM, Yaseen Khan wrote: > Trying to create dynamic forms by reading proto msgs. > > On 13-Feb-2018 22:48, "Adam Cozzette"

Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-13 Thread Yaseen Khan
Trying to create dynamic forms by reading proto msgs. On 13-Feb-2018 22:48, "Adam Cozzette" wrote: > What do you want to do with the descriptors? > > On Mon, Feb 12, 2018 at 10:15 PM, Yaseen Khan > wrote: > >> So, could you possibly give me the

Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-13 Thread 'Adam Cozzette' via Protocol Buffers
What do you want to do with the descriptors? On Mon, Feb 12, 2018 at 10:15 PM, Yaseen Khan wrote: > So, could you possibly give me the work around for it? It would be very > helpful. Thanks! > > On Friday, 9 February 2018 17:06:45 UTC+5:30, Yaseen Khan wrote: >> >>

[protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.

2018-02-12 Thread Yaseen Khan
So, could you possibly give me the work around for it? It would be very helpful. Thanks! On Friday, 9 February 2018 17:06:45 UTC+5:30, Yaseen Khan wrote: > > I'm trying to get the descriptor for my proto message. In java there is > this, Message.getDescriptor() > which does the job but its

Re: [protobuf] Descriptor for ProtoBuf Messages in Javascript.

2018-02-12 Thread 'Adam Cozzette' via Protocol Buffers
JSPB doesn't include descriptors in the generated code, so unfortunately there's no easy way to do this. On Fri, Feb 9, 2018 at 3:36 AM, Yaseen Khan wrote: > I'm trying to get the descriptor for my proto message. In java there is > this, Message.getDescriptor() >

[protobuf] Descriptor for ProtoBuf Messages in Javascript.

2018-02-09 Thread Yaseen Khan
I'm trying to get the descriptor for my proto message. In java there is this, Message.getDescriptor() which does the job but its hard to find something similar in jspb. syntax = "proto3"; message Master { int32 id = 1; string name = 2; Type type = 3; } enum Type { UNKNOWN_TYPE = 0;

Re: [protobuf] Where to find Protobuf Javascript tutorial?

2017-07-19 Thread hce h
Thanks for the response. If I understand it correctly, the js package contains a js directory which is pre-built javascript libraries. I built the C++ package and I can use the C++ package to generate javascript library by running "protoc --js_out=library=myproto_libs,b

Re: [protobuf] Where to find Protobuf Javascript tutorial?

2017-07-17 Thread 'Feng Xiao' via Protocol Buffers
On Sat, Jul 15, 2017 at 8:28 PM, hce h <jupiter@gmail.com> wrote: > Hi, > > We are using javascript for web front end development and we are using the > protobuf to communicate with backend web applications. Currently we are > using GO to do protobuf communicatio

[protobuf] Where to find Protobuf Javascript tutorial?

2017-07-15 Thread hce h
Hi, We are using javascript for web front end development and we are using the protobuf to communicate with backend web applications. Currently we are using GO to do protobuf communication between the backend application server which runs on C++ and the front end running on Javascript

Re: [protobuf] Javascript with Protobuf FileDescriptorSet and what is equivalent to DynamicMessage.parse(FileDescriptor, byte[] payload) ?

2017-04-14 Thread 'Adam Cozzette' via Protocol Buffers
Unfortunately the Javascript implementation doesn't support this kind of DynamicMessage functionality. In Javascript you can only really manipulate a protocol buffer if you have already built the generated code with protoc. On Fri, Apr 7, 2017 at 5:15 PM, Vijay Balakrishnan <bvija...@gmail.

[protobuf] Javascript with Protobuf FileDescriptorSet and what is equivalent to DynamicMessage.parse(FileDescriptor, byte[] payload) ?

2017-04-07 Thread Vijay Balakrishnan
, I can use DynamicMessage.parse(FileDescriptor, byte[] payload) to do this after identifying the relevant desc file using a key to connect the client to the desc file. How do i do this in javascript or node.js ? TIA, Vijay -- You received this message because you are subscribed to the Google

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-21 Thread gunnar . gissel
fileReader = new FileReader(); fileReader.onload = function(){ //here we've translated the blob into something our protobuf javascript can understand arrBuff = this.result; //here we get an object to work with var pkg = proto.package.MyPeopleProto.deserializeBina

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-21 Thread 'Adam Cozzette' via Protocol Buffers
AM, <gunnar.gis...@noaa.gov> wrote: > >> I don't expect that the code got pulled into the protobuf library because >> I'm pulling the generated javascript files out of a jar created by maven >> and using them on a box that has been set up solely for doing the >> javas

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-15 Thread Gunnar Gissel - NOAA Federal
, <gunnar.gis...@noaa.gov> wrote: > I don't expect that the code got pulled into the protobuf library because > I'm pulling the generated javascript files out of a jar created by maven > and using them on a box that has been set up solely for doing the > javascript side of things. Th

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-15 Thread gunnar . gissel
I don't expect that the code got pulled into the protobuf library because I'm pulling the generated javascript files out of a jar created by maven and using them on a box that has been set up solely for doing the javascript side of things. The protobuf install there is via npm, although I had

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-15 Thread gunnar . gissel
: 'ECMASCRIPT5', create_source_map: 'target/full.js.map' } } } }); grunt.registerTask('default', ['closure-compiler']); } The javascript is generated via Maven, so here is the command we are using: com.github.os72

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-15 Thread 'Adam Cozzette' via Protocol Buffers
If you could share your gruntfile that would be great. I would be interested to know in particular the protoc command used to generate the Javascript. Also it would be good to verify that the generated code for that proto did not somehow get pulled into the protobuf build and end up being part

[protobuf] Generated Javascript Protobufs and Grunt

2017-02-15 Thread gunnar . gissel
I've got some javascript generated from protoc and I'm trying to compile all those files together with closure-compiler so I can use them in a client app. I'm using Grunt and closure compiler and can provide my gruntfile and generated javascript if it would help. My problem

[protobuf] How to use protoc with Node http - and in a Javascript client

2016-11-15 Thread Jorg Janke
I am trying to send/receive protoc with Node and in a Javascript client. With the Node code below, I get: TypeError: First argument must be a string or Buffer What am I missing? The actual server is Java based. Thanks! Jorg : var postData = protoRequest.serializeBinary(); // Uint8Array var

[protobuf] Re: how can i change my protobuf object to byte arrays in javascript

2016-07-22 Thread 'Josh Haberman' via Protocol Buffers
For the moment, you can call msg.serializeBinary(), but make sure you generated the JavaScript with the binary=1 option. In the near future this will be changing. The binary serialization code will get generated into separate files from the data structures themselves. So in the future

[protobuf] Where is jspb.Map for my Javascript protobuf-client?

2016-07-08 Thread Juli H
Hi, from a thread (https://groups.google.com/forum/#!topic/protobuf/v8nXb-aj0rg) I got the information that I have to include the protobuf/js/messages.js file to get the definition of jspb.Message. But including this file leads me to the next missing definition. In the messages.js a

Re: [protobuf] Generated javascript dtos requiring missing built in proto types types, e.g. Timestamp (using beta-3, proto3, CommonJs)

2016-06-01 Thread Keith Woods
> I'm using proto3 with the last beta 3 (v3.0.0-beta-3) to generate >> javascript DTOS as CommonJs modules. >> >> In the generated javascript, built in proto type (e.g. >> google.protobuf.Timestamp) are 'required' but don't exist. >> >> For example, given this

[protobuf] Re: Using v3.0.0-beta-3 generated Javascript requires built in type (e.g. timestamp.proto) but protoc doesn't spit them out

2016-06-01 Thread Keith Woods
> an issue with the generated javascript. It's not generating .js files for > my 'out of the box' proto imports (i.e. for the include Timestamp type). > > Given this .ptoto: > > // foo.proto > syntax = "proto3"; > > import "google/protobuf/timestamp.proto"

Re: [protobuf] Generated javascript dtos requiring missing built in proto types types, e.g. Timestamp (using beta-3, proto3, CommonJs)

2016-06-01 Thread 'Feng Xiao' via Protocol Buffers
On Wed, Jun 1, 2016 at 9:18 AM, Keith Woods <devsh...@gmail.com> wrote: > Hi All > > I'm using proto3 with the last beta 3 (v3.0.0-beta-3) to generate > javascript DTOS as CommonJs modules. > > In the generated javascript, built in proto type (e.g. > google.protob

[protobuf] Using v3.0.0-beta-3 generated Javascript requires built in type (e.g. timestamp.proto) but protoc doesn't spit them out

2016-06-01 Thread Keith Woods
Hi all I'm using protoc from the latest beta release (v3.0.0-beta-3) I'm having an issue with the generated javascript. It's not generating .js files for my 'out of the box' proto imports (i.e. for the include Timestamp type). Given this .ptoto: // foo.proto syntax = "proto3"

[protobuf] Generated javascript dtos requiring missing built in proto types types, e.g. Timestamp (using beta-3, proto3, CommonJs)

2016-06-01 Thread Keith Woods
Hi All I'm using proto3 with the last beta 3 (v3.0.0-beta-3) to generate javascript DTOS as CommonJs modules. In the generated javascript, built in proto type (e.g. google.protobuf.Timestamp) are 'required' but don't exist. For example, given this proto: // foo.proto syntax = "p

[protobuf] Question regarding Any.Proto inside Javascript (NodeJS)

2015-11-24 Thread Brandon K
ype-safety. Are there any helpers that are similar for Javascript? I note from this Language Guide link <https://developers.google.com/protocol-buffers/docs/proto3?hl=en> (about 50% down the page in "Any" section) it states *"*Currently the runtime libraries for working with

Re: [protobuf] Question regarding Any.Proto inside Javascript (NodeJS)

2015-11-24 Thread 'Feng Xiao' via Protocol Buffers
value = Uint8Array[5] > }, > validationErrors = [ ] > } > > > In Java there exists the pack( ) and unpack( ) methods to handle this > process ensuring type-safety. Are there any helpers that are similar for > Javascript? > > I note from this Language Guide link > <https://deve

[protobuf] Re: JavaScript

2015-03-24 Thread Timo K
allow us to output JavaScript along with C++, Java, and Python? -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post

[protobuf] Re: JavaScript

2015-03-23 Thread Leo Gallucci
Almost 6 years later, what do you think about this now? What about using https://github.com/dcodeIO/ProtoBuf.js ? or is it still more convenient to simply stick to JSON/BSON/PSON? -- Leo On Friday, June 26, 2009 at 2:17:58 AM UTC+2, Kenton Varda wrote: One problem with javascript

[protobuf] Re: ProtoBuf.js - protobuf for JavaScript

2013-03-18 Thread Daniel Wirtz
If you have a project that should be listed here, please send a message to the discussion group I'd be happy if you'd add ProtoBuf.js to http://code.google.com/p/protobuf/wiki/ThirdPartyAddOns#Programming_Languages -- You received this message because you are subscribed to the Google Groups

Re: [protobuf] Re: ProtoBuf.js - protobuf for JavaScript

2013-03-18 Thread Feng Xiao
. Added Javascript: https://github.com/dcodeIO/ProtoBuf.js;. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post

[protobuf] ProtoBuf.js - protobuf for JavaScript

2013-03-07 Thread Daniel Wirtz
A protobuf implementation including a .proto parser, reflection, message class building and simple encoding and decoding in plain JavaScript. No compilation step required, works out of the box on .proto files. GitHub: https://github.com/dcodeIO/ProtoBuf.js npm: https://npmjs.org/package

[protobuf] Javascript protocol buffer implementation

2010-02-22 Thread Patrick Horn
Hi all, I am announcing a BSD-licensed javascript protocol buffer implementation, called protojs. The library supports all wire types, as well as packed fields (not autodetection yet), float/double support thanks to jsfromhell.com, and Unicode support. You can find the github site here

[protobuf] javascript protocol buffers encoder

2010-01-04 Thread alf
There are any away to encode data to protobuffer message directly from javascript ? what do you think about this idea. load data, encode, convert to string, send to server, receive to serve, convert string to bytes, decode to pb message any opensource tools. many thanks. -- You received

Re: [protobuf] javascript protocol buffers encoder

2010-01-04 Thread Kenton Varda
Two problems with encoding/decoding binary messages in javascript: - Javascript doesn't have a usable array of bytes type. - Even if it did, encoding/decoding would be painfully slow and would require downloading a lot of code to the client. A better idea is to encode messages in JSON format

Re: JavaScript

2009-06-25 Thread Alek Storm
That one doesn't look complete. I've got one that almost is. On Thu, Jun 25, 2009 at 3:53 PM, Marc Gravell marc.grav...@gmail.comwrote: I haven't tried it, but http://code.google.com/p/protobuf/wiki/OtherLanguages lists javascript support here: http://code.google.com/p/protobuf-js

Re: JavaScript

2009-06-25 Thread Kenton Varda
One problem with javascript and protobuf is that you need a lot of support code to parse the messages. Unless you end up sending quite a lot of stuff back and forth, making the user download a JS protobuf codec library may be a net loss. It may be better to use JSON or XML because browsers