Re: [protobuf] Will protobuf support JSON?

2016-07-29 Thread Alfred Kwan
I can see it now, thank you. Btw congrats on the official 3.0 release! Good work indeed. On Wednesday, July 20, 2016 at 4:13:49 PM UTC-4, Feng Xiao wrote: > > > > On Wed, Jul 20, 2016 at 5:23 AM, Alfred Kwan > wrote: > >> I use the C++ package. >> > For C++,

Re: [protobuf] Will protobuf support JSON?

2016-07-20 Thread Alfred Kwan
I use the C++ package. On Friday, July 15, 2016 at 6:39:26 PM UTC-4, Feng Xiao wrote: > > On Fri, Jul 15, 2016 at 1:11 PM, Alfred Kwan > wrote: > >> I looked at the 3.0 beta package and I believe the JSON support is not in >> yet. Am I correct? >> > What pac

Re: [protobuf] Will protobuf support JSON?

2016-07-15 Thread Alfred Kwan
I looked at the 3.0 beta package and I believe the JSON support is not in yet. Am I correct? On Tuesday, May 12, 2015 at 2:56:16 PM UTC-4, Feng Xiao wrote: > > On Tue, May 12, 2015 at 9:56 AM, Mikhail Melnik > wrote: > >> There is mention in official documentation >> https://developers.google.c

[protobuf] Check whether a oneof field is set via reflection(C++ in v3.0.0-alpha-2)

2016-01-14 Thread Alfred Kwan
I would like to check (via reflection) whether a particular field within a oneof. This is the example message: message Foo { oneof Bar { int32 A = 1; string B = 2; } } I browse through the .h and it seems like the only plausible check is to examine it via Foo.GetReflection->

Re: [protobuf] Re: Protobuf Buffers v3.0.0-alpha-1

2015-04-30 Thread Alfred Kwan
_value() and has_value() > methods (C++) but unfortunately the has_value is private. > Is there a reason such a useful and short method is declared private (it > implementation only uses public functionality as well) > > > > On Wednesday, February 11, 2015 at 3:55:03 PM UT

Re: [protobuf] Re: How to check empty message object

2015-03-27 Thread Alfred Kwan
I meant the hazzers have to go away for proto3 ;-) We have been evaluating proto2 vs proto3 and I have posted a few questions/issue about the 'has_foo()' logic, their answers gave me an impression of this is related to the default value. Btw the alpha-1 release notes

[protobuf] Re: How to check empty message object

2015-03-25 Thread Alfred Kwan
There are more than just the rationale of "most users don't use the field presence logic much". If I understand it correctly, Google wants to make proto3 available to other languages (e.g. Ruby) where there is no concept of default values, meanwhile 'has_foo()' relies on the default value, whic

[protobuf] Re: How to check empty message object

2015-03-18 Thread Alfred Kwan
It depends on what protobuf version you are using. There will be a had_foo() for each optional field if you are using protobuf version 2.xx (see C++ code reference ). You are out of luck if you are using V3.0 because y

[protobuf] Questions about Protocol Buffers v3.0.0-alpha-2

2015-03-09 Thread Alfred Kwan
It is surprising to see there is no post about the alpha-2 released! (release note was dated in February 26th) We have came across a few bugs in the C++ alpha-1 release so I hope they are being addressed in alpha-2. I would like to know a few things about this release: 1. Will there be a list o

Re: [protobuf] Re: Protobuf Buffers v3.0.0-alpha-1

2015-02-11 Thread Alfred Kwan
y 8, 2015 at 11:01:04 PM UTC-5, Feng Xiao wrote: > > The union types are obsoleted by oneof: > https://developers.google.com/protocol-buffers/docs/proto#oneof > > On Sat, Feb 7, 2015 at 4:53 AM, Alfred Kwan > wrote: > >> To implement the has_boo() in 3.0 implies one boolea

Re: [protobuf] Re: Protobuf Buffers v3.0.0-alpha-1

2015-02-08 Thread Alfred Kwan
To implement the has_boo() in 3.0 implies one boolean per each truly optional field, which means additional maintenance is now required, e.g. matching naming scheme for the pool together with the optional struct, also should we group all booleans together or should they sit right next to the to

Re: [protobuf] Re: Protobuf Buffers v3.0.0-alpha-1

2015-02-08 Thread Alfred Kwan
It seems to be an annoyance now to implement the recommended union types with the 3.0 because has_foo() is not longer supported. Instead of one bool for each possible message within the "union", what do you think about adding