Thanks! very helpful

On Fri, Mar 9, 2018 at 1:46 PM, Jon Skeet <[email protected]> wrote:

> On Thursday, 8 March 2018 13:51:45 UTC, ke ren wrote:
>>
>> Thanks to confirm it. will JsonParser use pbr::OriginalName or the field
>> name in generated class for json deseriliazation? If it uses the field
>> name, probably it would work. Otherwise, probably have to consider data
>> deser bridge or something.
>>
>
> The JSON parser will use the json_name part from the descriptor:
> https://github.com/google/protobuf/blob/master/csharp/src/Google.Protobuf/
> Reflection/FieldDescriptor.cs#L100
> https://github.com/google/protobuf/blob/master/src/
> google/protobuf/descriptor.proto#L211
>
> That can be set on a per-field basis with the json_name option, so that
> may help you.
>
> Jon
>
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Protocol Buffers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/protobuf/HeTwIRb7DCs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to