Re: [protobuf] What is wrong with my proto file here? Is it not possible to have 2 repeated fields of different types?
Thanks Marc...That was helpful On Thu, Jul 12, 2018 at 3:03 PM Marc Gravell wrote: > also, field zero (type) is invalid; you are welcome to use this as an > online check tool - but protoc also outputs similar messages: > > https://protogen.marcgravell.com#gc4759103e204eec4ae1a11ce6089a4bf > > On Thu, 12 Jul 2018 at 23:01, Marc Gravell wrote: > >> datavalues_srarray and datavalues_prarray need to have different >> field numbers >> >> On Thu, 12 Jul 2018 at 22:50, Himabindu Dittakavi >> wrote: >> >>> Hi All, >>> >>> New to protobuf. >>> Here is my proto file. If i use the code highlighted in yellow it works >>> but when I add the one in yellow - there is no .cs file generated...what is >>> wrong with the code below? TIA. Also, is there a proto file validator by >>> any chance? >>> >>> syntax = "proto3"; >>> package tutorial; >>> option csharp_namespace = "Google.Protobuf.Examples.SS"; >>> >>> message SS { >>> int32 id = 1; // Unique ID number for this message or ss. >>> enum GeneratedDataType { >>> SR = 0; >>> PR = 1; >>> SE = 2; >>> } >>>message DataValueSr { >>> GeneratedDataType type = 0; >>> string value = 100; >>> } >>>message DataValuePr { >>> GeneratedDataType type = 1; >>> string value = 100; >>> } >>> >>> repeated DataValueSr datavalues_srarray = 1000; >>> repeated DataValuePr datavalues_prarray = 1000; >>> } >>> >>> -- >>> 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. >>> >> >> >> -- >> Regards, >> >> Marc >> > > > -- > Regards, > > Marc > -- 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] What is wrong with my proto file here? Is it not possible to have 2 repeated fields of different types?
also, field zero (type) is invalid; you are welcome to use this as an online check tool - but protoc also outputs similar messages: https://protogen.marcgravell.com#gc4759103e204eec4ae1a11ce6089a4bf On Thu, 12 Jul 2018 at 23:01, Marc Gravell wrote: > datavalues_srarray and datavalues_prarray need to have different > field numbers > > On Thu, 12 Jul 2018 at 22:50, Himabindu Dittakavi > wrote: > >> Hi All, >> >> New to protobuf. >> Here is my proto file. If i use the code highlighted in yellow it works >> but when I add the one in yellow - there is no .cs file generated...what is >> wrong with the code below? TIA. Also, is there a proto file validator by >> any chance? >> >> syntax = "proto3"; >> package tutorial; >> option csharp_namespace = "Google.Protobuf.Examples.SS"; >> >> message SS { >> int32 id = 1; // Unique ID number for this message or ss. >> enum GeneratedDataType { >> SR = 0; >> PR = 1; >> SE = 2; >> } >>message DataValueSr { >> GeneratedDataType type = 0; >> string value = 100; >> } >>message DataValuePr { >> GeneratedDataType type = 1; >> string value = 100; >> } >> >> repeated DataValueSr datavalues_srarray = 1000; >> repeated DataValuePr datavalues_prarray = 1000; >> } >> >> -- >> 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. >> > > > -- > Regards, > > Marc > -- Regards, Marc -- 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] What is wrong with my proto file here? Is it not possible to have 2 repeated fields of different types?
datavalues_srarray and datavalues_prarray need to have different field numbers On Thu, 12 Jul 2018 at 22:50, Himabindu Dittakavi wrote: > Hi All, > > New to protobuf. > Here is my proto file. If i use the code highlighted in yellow it works > but when I add the one in yellow - there is no .cs file generated...what is > wrong with the code below? TIA. Also, is there a proto file validator by > any chance? > > syntax = "proto3"; > package tutorial; > option csharp_namespace = "Google.Protobuf.Examples.SS"; > > message SS { > int32 id = 1; // Unique ID number for this message or ss. > enum GeneratedDataType { > SR = 0; > PR = 1; > SE = 2; > } >message DataValueSr { > GeneratedDataType type = 0; > string value = 100; > } >message DataValuePr { > GeneratedDataType type = 1; > string value = 100; > } > > repeated DataValueSr datavalues_srarray = 1000; > repeated DataValuePr datavalues_prarray = 1000; > } > > -- > 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. > -- Regards, Marc -- 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.