Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
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. > 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 {..} >> >> 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. For example, >> your serialized message could store a map that maps the >> string property name to another message called DataType describing the kind >> of data associated with that property. >> >> On Tue, Feb 13, 2018 at 10:05 AM, Yaseen Khan >> wrote: >> >>> 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 without using the actual field names. On Tue, Feb 13, 2018 at 9:28 AM, Yaseen Khan wrote: > 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 reading its keys,.. I didn't find it to be a good > approach. > > On 13-Feb-2018 22:52, "Adam Cozzette" wrote: > >> 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 < >> khan.charlie...@gmail.com> wrote: >> >>> 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 < khan.charlie...@gmail.com> 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: >> >> 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; >> INDUSTRY_TYPE = 1; >> LOCATION_TYPE = 2; >> } >> >> This is the message of which i want the descriptor of. >> > -- > 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 to this group, send email to protobuf@googlegroups.com. > 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 protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
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 Khanwrote: > 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. For example, your > serialized message could store a map that maps the string > property name to another message called DataType describing the kind of > data associated with that property. > > On Tue, Feb 13, 2018 at 10:05 AM, Yaseen Khan > wrote: > >> 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 without using the actual field names. >>> >>> On Tue, Feb 13, 2018 at 9:28 AM, Yaseen Khan >>> wrote: >>> 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 reading its keys,.. I didn't find it to be a good approach. On 13-Feb-2018 22:52, "Adam Cozzette" wrote: > 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 < > khan.charlie...@gmail.com> wrote: > >> 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 < >>> khan.charlie...@gmail.com> 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: > > 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; > INDUSTRY_TYPE = 1; > LOCATION_TYPE = 2; > } > > This is the message of which i want the descriptor of. > -- 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 to this group, send email to protobuf@googlegroups.com. 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 protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
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. For example, your serialized message could store a map that maps the string property name to another message called DataType describing the kind of data associated with that property. On Tue, Feb 13, 2018 at 10:05 AM, Yaseen Khan wrote: > 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 without using the actual field names. >> >> On Tue, Feb 13, 2018 at 9:28 AM, Yaseen Khan >> wrote: >> >>> 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 reading its keys,.. I didn't find it to be a good >>> approach. >>> >>> On 13-Feb-2018 22:52, "Adam Cozzette" wrote: >>> 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" wrote: > >> What do you want to do with the descriptors? >> >> On Mon, Feb 12, 2018 at 10:15 PM, Yaseen Khan < >> khan.charlie...@gmail.com> 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: 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; INDUSTRY_TYPE = 1; LOCATION_TYPE = 2; } This is the message of which i want the descriptor of. >>> -- >>> 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 to this group, send email to protobuf@googlegroups.com. >>> 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 protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
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 mapthat maps the string property name to another message called DataType describing the kind of data associated with that property. On Tue, Feb 13, 2018 at 10:05 AM, Yaseen Khan wrote: > 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 without using the actual field names. >> >> On Tue, Feb 13, 2018 at 9:28 AM, Yaseen Khan >> wrote: >> >>> 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 reading its keys,.. I didn't find it to be a good >>> approach. >>> >>> On 13-Feb-2018 22:52, "Adam Cozzette" wrote: >>> 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" wrote: > >> What do you want to do with the descriptors? >> >> On Mon, Feb 12, 2018 at 10:15 PM, Yaseen Khan < >> khan.charlie...@gmail.com> 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: 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; INDUSTRY_TYPE = 1; LOCATION_TYPE = 2; } This is the message of which i want the descriptor of. >>> -- >>> 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 to this group, send email to protobuf@googlegroups.com. >>> 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 protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
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 without using the actual field names. > > On Tue, Feb 13, 2018 at 9:28 AM, Yaseen Khan > wrote: > >> 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 reading its keys,.. I didn't find it to be a good >> approach. >> >> On 13-Feb-2018 22:52, "Adam Cozzette" wrote: >> >>> 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" wrote: > What do you want to do with the descriptors? > > On Mon, Feb 12, 2018 at 10:15 PM, Yaseen Khan < > khan.charlie...@gmail.com> 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: >>> >>> 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; >>> INDUSTRY_TYPE = 1; >>> LOCATION_TYPE = 2; >>> } >>> >>> This is the message of which i want the descriptor of. >>> >> -- >> 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 to this group, send email to protobuf@googlegroups.com. >> 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 protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
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 Khanwrote: > 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 reading its keys,.. I didn't find it to be a good > approach. > > On 13-Feb-2018 22:52, "Adam Cozzette" wrote: > >> 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" wrote: >>> What do you want to do with the descriptors? On Mon, Feb 12, 2018 at 10:15 PM, Yaseen Khan < khan.charlie...@gmail.com> 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: >> >> 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; >> INDUSTRY_TYPE = 1; >> LOCATION_TYPE = 2; >> } >> >> This is the message of which i want the descriptor of. >> > -- > 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 to this group, send email to protobuf@googlegroups.com. > 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 protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
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 reading its keys,.. I didn't find it to be a good approach. On 13-Feb-2018 22:52, "Adam Cozzette"wrote: > 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" 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 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 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; > INDUSTRY_TYPE = 1; > LOCATION_TYPE = 2; > } > > This is the message of which i want the descriptor of. > -- 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 to this group, send email to protobuf@googlegroups.com. 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 protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
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 Khanwrote: > 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 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 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; INDUSTRY_TYPE = 1; LOCATION_TYPE = 2; } This is the message of which i want the descriptor of. >>> -- >>> 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 to this group, send email to protobuf@googlegroups.com. >>> 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 protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
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 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 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; >>> INDUSTRY_TYPE = 1; >>> LOCATION_TYPE = 2; >>> } >>> >>> This is the message of which i want the descriptor of. >>> >> -- >> 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 to this group, send email to protobuf@googlegroups.com. >> 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 protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
What do you want to do with the descriptors? On Mon, Feb 12, 2018 at 10:15 PM, Yaseen Khanwrote: > 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 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; >> INDUSTRY_TYPE = 1; >> LOCATION_TYPE = 2; >> } >> >> This is the message of which i want the descriptor of. >> > -- > 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 to this group, send email to protobuf@googlegroups.com. > 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 protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
[protobuf] Re: Descriptor for ProtoBuf Messages in Javascript.
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 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; > INDUSTRY_TYPE = 1; > LOCATION_TYPE = 2; > } > > This is the message of which i want the descriptor of. > -- 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 to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.