Hi Jon,

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.

Ke

On Thursday, 8 March 2018 13:24:20 UTC, Jon Skeet wrote:
>
> On Thursday, 8 March 2018 11:41:28 UTC, ke ren wrote:
>>
>> I am trying to migrate our project to protobuf and find one annoying 
>> feature in protobuf c# codegen. It will automatically rename the field name 
>> defined in proto during codgen to fit camel convention. For 
>> example, NURBSSurface will be renamed to Nurbssurface, XRay to Xray etc. It 
>> causes big naming changes in code and back compatibility issue with old 
>> data format which is field name case senstitive. Is there any way to stop 
>> codegen renaming?
>>
>
> No, that's not configurable. (It was in my original proto2 port, but we 
> reduced the set of options for the proto3 version for simplicity.)
>
> For some cases, just changing the protobuf field name  would work, e.g. 
> x_ray will create a property called XRay. You probably don't want a field 
> called n_u_r_b_s_surface though...
>
> Jon
>

-- 
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