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 <[email protected]> wrote: > Hi, > Newbie to protobuf and pardon my naivete on this topic. > > I would like to use protoc --descriptor_set_out=out.desc -js_out= > import_style=commonjs,error_on_name_conflict,binary:. mymessage.proto > > I have code to upload this out.desc to my server to S3. using out.desc as > I want multiple clients to upload their separate descriptor files to me > I have a node.js micro-service and want to be able to handle a byte[] > payload using this out.desc. The micro-service receives a key along with > the byte[] payload. I use the key on the backend to identify the out.desc > filedescriptor to use. > In Java, 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 Groups > "Protocol Buffers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/protobuf. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
