[protobuf] Json object hash

2017-07-05 Thread alex
Hi everyone, I'm trying to produce a specific response format and I'm struggling with the protobuf syntax to generate it. Worth mentioning, I'm new to protobuf and am struggling a bit with the docs, so it's likely that I missed something. The format I'm trying to produce, in json: {

[protobuf] Re: Json object hash

2017-07-05 Thread Arpit Baldeva
A list as a 'value type' in not supported for map. I have not worked with JavaScript and protobuf but I believe in the other languages, it will be a code generation error. In general, I have had the similar problems you have when you need to come up with a particular json format which protobuf

Re: [protobuf] Protobuf Json conversion

2017-07-05 Thread 'Feng Xiao' via Protocol Buffers
You can keep using proto2 (i.e., adding 'syntax = "proto2";' to your existing files). There is a catch though: the JSON support is designed for proto3 and won't work well (or won't work at all) for proto2 only features. If feasible, it might be better to migrate to proto3 to avoid any confusion

[protobuf] Proto compiler creating Strong Type Enum

2017-07-05 Thread Abhi
Hi I am using proto compiler 3.1 and it's a C++ project. When I compile my proto Its generating myproto.struct.h file along with myproto.pb.cc and myproto.pb.h. So the issue is in my myproto.struct.h the enum is created as strong typed enum and when I compile this file with VS2010 I am

Re: [protobuf] why not 150

2017-07-05 Thread 'Feng Xiao' via Protocol Buffers
"96 01" is written in hex. 0x96 = 150. On Sun, Jul 2, 2017 at 6:18 AM Jing Lupeng wrote: > > https://developers.google.com/protocol-buffers/docs/encoding#structure > > > >