Re: [protobuf] can protobuf3 be used with protobuf2?

2016-04-29 Thread Kostiantyn Shchepanovskyi
It would be nice to have a migration guide (checklist) somewhere, like: 1. All fields should be optional. 2. Do not use custom defailt values. 3. All enums should have first element with tag = 0. 4. Do not use extension for anything except custom options. Something else? On Friday, April 29,

[protobuf] Re: Reflecting Custom Options in Protobuf C#

2016-04-29 Thread Jon Skeet
On Thursday, 28 April 2016 22:58:42 UTC+1, TravG wrote: > > I'm using Protobufs in C# and wondering how I can get access to custom > options I've annotated on a field at runtime via reflection. I see some > indications that this should be possible: > Hmm... I don't *think* we expose it at the

[protobuf] Re: Where is jspb.Message provided?

2016-04-29 Thread Jeffrey Getzin
Scratch that. I found where it was being provided. Now, though, I don't know how to use the generated JavaScript file. Say I have a protobuffer definition file: MyProtobuffer.proto which defines an message SuperDuperMessage, and I've compiled the proto file with protoc into

Re: [protobuf] Overriding default field names in JSON serialization

2016-04-29 Thread 'David Koch' via Protocol Buffers
Hi Feng, Thank you! On Tuesday, April 26, 2016 at 12:04:07 AM UTC+2, Feng Xiao wrote: > > You can use the json_name field option to specify the name you want to use > in JSON. For example: > message Foo { > string id = 1 [json_name = "@id"]; > } > > The JSON format will then be: > { >