I agree with John's points; if you code several environments, then its version gives you a similar API for other "core" implementations. protobuf-net is much more similar to how most of the .NET serializers are implemented, so itβs more familiar (IMO) for .NET developers. And, as John notes, the raw binary output must be identical so that you can re-implement with another API if you need to later.
Some re protobuf-net points that relate to this implementation:
- works with existing types (not just generated types from .proto)
- works under things like WCF and memcached.
- can be used to implement
ISerializable for existing types - supports inheritance methods * and serialization processing methods
- supports common patterns such as
ShouldSerialize[name] - works with existing decorated types (
XmlType / XmlElement or DataContract / DataMember ) - which means (for example) that LINQ-to-SQL models serialize ready-made ones (as long as serialization is included in DBML) - in v2, works for POCO types without any attributes
- in v2 works in .NET 1.1 (not sure if this is a huge selling function) and most other frameworks (including monotouch - yay!)
- perhaps (not yet implemented) v2 can support full-graph serialization (and not just tree serialization)
(* = these functions use a 100% valid protobuff binary, but which can be difficult to consume from other languages)
Marc Gravell Mar 26 '10 at 11:18 2010-03-26 11:18
source share