I looked at it for a while
Binary serialization seems to be discouraged, since any change to field names interrupts serialization =? Not good
XMLSerializer is problematic because you have to provide a constructor and public fields without arg, although you have more control over the elements that are attributes or elements, and their naming
DataContractSerializer is good, but all suclassses should be explicitly added, which is a shame
However, I came across a NetDataContractSerializer that does not have this limitation.
If your goal is C # serialization and there are no big restrictions on xml size, NetDataContractSerializer will always be here.
source
share