Re: [protobuf] Deserializing of protobf Message from JSON string in C++

2017-10-25 Thread 'Feng Xiao' via Protocol Buffers
On Wed, Oct 25, 2017 at 1:46 AM, Giri Guntipalli wrote: > I am also facing similar issue but problem seems to happen only when > library is complied with -O2 or –Os(optimize for size) with gcc tool chain. > > > > looks like extensions are being treated as dead code and removed by gcc > optimizat

Re: [protobuf] Deserializing of protobf Message from JSON string in C++

2017-10-25 Thread Giri Guntipalli
I am also facing similar issue but problem seems to happen only when library is complied with -O2 or –Os(optimize for size) with gcc tool chain. looks like extensions are being treated as dead code and removed by gcc optimization, any thoughts on overcoming this problem. Thank you Gir

Re: [protobuf] Deserializing of protobf Message from JSON string in C++

2013-06-05 Thread Channakeshava S C
Thanks for the reply. Yes, the extension defined in tha same .proto file. fd = x->GetReflection()->FindKnownExtensionByName("bar"); this is returning fd as NULL. foo.SetExtension(bar, xyzValue); and foo.AddExtension(bar, xyzValue); are possible when we invoke on foo variable. But why sa

Re: [protobuf] Deserializing of protobf Message from JSON string in C++

2013-06-05 Thread Feng Xiao
On Wed, Jun 5, 2013 at 2:44 AM, Channakeshava S C < channakeshava...@gmail.com> wrote: > I am facing problem in getting protobuf Message with extension from JSON > string {"xyz": [1234,2345,3456],"extensions":{"bar": [1,11,111]}} which is > generated from Foo. > > message Foo { > repeated int32

[protobuf] Deserializing of protobf Message from JSON string in C++

2013-06-05 Thread Channakeshava S C
I am facing problem in getting protobuf Message with extension from JSON string {"xyz": [1234,2345,3456],"extensions":{"bar": [1,11,111]}} which is generated from Foo. message Foo { repeated int32 xyz = 11; extensions 100 to 199; } extend Foo { repeated int32 bar = 123; } The word "ext