Google protobuf is great protocol to serialize objects efficient, but it only supports serialization of trees, not graphs (lack of full Object Reference Tracking).
There are few implementation of Google idea in .NET. (i.e. protobuf-csharp-port, or protosharp), but most interesting is protobuf-net.
Protobuf-net is better because its architecture fits, to .NET world, and has several add-ins (not always compatible with original protobuf, but very useful).
One of that add-in is possibility to turn on reference tracking (AsReference option), which allows to serialize complex graphs even with cycles.
Unnecessary Protobuf-net v2 is in beta version, and AsReference option not works at real world scenarios. (without this option everything works well, but without Reference Tracikng protobuf-net is not able to serialize graphs and is not longer attractive serializer).
It still have some bugs:
So, I can't use this great tool, and I'm looking for alternative serializer which:
- is at least as fast, and produces small output as protobuf
- is easy to adopt to current project like protobuf-net
- allows to serialize graph like DataContractSerializer with PreserveObjectReferences set to true
- is stable not only for simple objects, but for complex real world scenarios