I need a very specific kind of .NET serializer.
My requirements:
- shouldn't skip private data
- output should be human-readable (or at least, easily parsable), preferably XML
- should support generic collections (no need to be easy, but it should be possible)
- should support custom-implemented serialization for specific classes.
I need (2) for my elaborate version-tolerance scheme and (4) because I need to implement custom optimized serialization for a huge object (array) that I need to serialize.
XmlSerializer fails (1).
BinaryFormatter fails (2).
SoapFormatter fails (3) and seems to be deprecated.
DataContractSerializer fails (4) AFAIK.
NetDataContractSerializer seems to fail (2) because I read it's not "interoperable" (though it does use XML??)
Protobuf-net fails (2).
Could you recommend a serializer to use?
Also: How is NetDataContractSerializer not interoperable? Please give me an example where it breaks interoperability.
Note: all of those serializers support version tolerance in one way or another, but I need more advanced version tolerance features. See this question of mine if you care about why.
Edit: It turns out that both DataContractSerializer and NetDataContractSerializer support both (2) and (4) so my question is solved.