[protobuf] Problem in parsing JSON on repeated messages on protobuf , how to limit it

2019-09-12 Thread arun kumar
I have RepeatedMessage in my proto file, I am able to create C# object of my proto and serialize it and so..whereas , when I pass the value via JSON with only one value in collection , it threw error as Unhandled Exception: Google.Protobuf.InvalidProtocolBufferException: Repeated field value

[protobuf] Help Needed !! How to get proper hex value of serialized stream

2019-09-05 Thread arun kumar
I am trying to serialize the data using C# Google protobuf, and I am using below code , private static void printStream(IMessage msg) { int size = msg.CalculateSize(); byte[] buffer = new byte[size]; CodedOutputStream output = new

[protobuf] Re: Nested Types in C# generated code causes serilization issue

2019-08-19 Thread arun kumar
@Marc Gravell, I auto-generated ".cs" files from each ".proto" file. . Whereever a message declared inside another message in proto, auto-generated cs file is generated as " Nested Types " and Types class is generated as static. (I guess , its how the generator defined) And, I am trying to

[protobuf] Nested Types in C# generated code causes serilization issue

2019-08-19 Thread arun kumar
All, I am new to the usage of proto buffer with C sharp.. All I try is to get the input in XML and convert to C# object and then using google protobuf to serialize and deserialize. While converting the xml input to C# object, i am getting below because of nested types