SharpSerializer is an open source XML and binary serializer for .NET Framework, Silverlight, Windows Phone, Windows RT (Metro) and Xbox360
It was developed with C#. Actually SharpSerializer can serialize to Xml and to its own binary format - using overloaded constructor.

If you need a quick and easy way of storing your application data, without marking each of your data objects with ISerializable, or defining prior serialization all possible types you could ever serialize - use SharpSerializer. It's free of charge for any purpose.

SharpSerializer vs. BinaryFormatter

  • no need to mark serialized objects with ISerializable
  • no exception is thrown if unknown properties are deserialized (e.g. properties are removed from the data model after it has been serialized)

SharpSerializer vs. XmlSerializer

  • no need to pre-define all serialized types
  • serialization of multidimensional arrays, nested arrays, array-of-arrays
  • serialization of polymorphic properties (where property value is inherited from the property type - is its subtype)
  • serialization of generic types with polymorphic arguments (e.g. MyGenericClass<AbstractArgumentClass>)
  • serialization of generic listings (e.g. Dictionary<K,T>)
  • serialization of polymorphic listings (Collection, Dictionary, single dimensional array, multidimensional array)
  • serialization of listings of generic types with polymorphic arguments (e.g. an array IMyGenericInterface<MyAbstractClass>[, ,])

Target platforms

  • .NET 2.0 and above
  • Silverlight 3 and above
  • Windows Phone 7 and above
  • Windows RT (Metro)
  • Xbox 360
As a user of the NuGet.org plugin for VS, just search for "sharpserializer" in the "Add library package reference.." window in your VS.

Usage

var obj = CreateMyVerySophisticatedObject();

// using default constructor serializes to xml
var serializer = new SharpSerializer();

serializer.Serialize(obj, "test.xml");

var obj2 = serializer.Deserialize("test.xml");

External links with more information about SharpSerializer

Last edited Mar 22 at 12:54 PM by polo, version 8