开发者

Will protobuff-net work with protoc 2.4.1

We have a java backend surfacing proto objects using the google implementation. We now want to use these objects in .net on the clien开发者_开发问答t side and manipulate them. The issue is that we don't want rely on google's immutable proto objects implementation on the client side as we will be modifying the object a lot.

We noticed that protobuff-net offers mutable objects. My question is which verison of protobuff-net will work with google protoc 2.4.1 so that we can get the same proto bin files defined.

thanks,


If you have an existing .proto defintion, then the "protogen" tool included can act as code-gen tool for protobuf-net (creating mutable classes etc). This is shipped with v1, but will be included in v2 as soon as I finish those pesky extension members...

Note that protogen uses protoc internally (which is actually why it is so overweight) to compile the .proto for processing, but if you already have a compiled (binary) definition you can feed that to protogen too.

The implementation (in terms of data on the wire etc) should be fully compatible. Note that there are some protobuf-net only features (inheritance, etc), but none of these will be triggered if you are generating code from a .proto.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜