I have code using XmlSerializer
to serialize/deserialize a data structure for persistance. I've read and heard in several places here on StackOverflow that XmlSerializer
is one or more of:
My question is two-fold; is any of the above true, and if so, what alternatives exist? For my purposes, XML works very well, and I would like to keep that much constant, but everything else is open to change.
EDIT: If you want to suggest something other to XML, I'm open to it, but it does need to be human-readable.
XmlSerializer
is perfectly supportable, but has some glitches;
However, I expect it to continue to be there for a considerable time; IMO, it is BinaryFormatter
that has the real problems (when used for persistence).
I'm very biased (since I'm the author), but I'd choose protobuf-net; a binary serializer using Google's "protocol buffers" wire format; fast, portable between languages/platforms, very small output, version tolerant, etc (and free, of course). Clearly not xml, though - so not human readable.