Skip to content

Orckestra/OmniSerializer

 
 

Repository files navigation

This project is a fork of NetSerializer and add the following functionality:

  • No longer requires the classes to be decorated with [Serializable]
    • Classes from the System.* and Microsoft.* namespaces without [Serializable] are not supported and will not be serialized
  • Block the serialization of anonymous types since they cannot be safely deserialized in another instance/process because the anonymous type is not known when a process restart
  • Allows deferred IEnumerable<> to be serialized
  • Types to serialize are automatically detected
    • This is achieved by adding the type's name to the serialized stream instead of the 'TypeId' value
      • Types are cached in a static field to speed up the serialization/deserialization
    • Fields are still serialized in the same order as NetSerializer so client and server must still have the same version. An exception will be thrown if a class was modified since it was serialized (e.g.: different number of fields).
  • Throws an exception when a circular reference is detected instead of generating a stack overflow
  • New serializers:
    • Hashset
    • Hashtable
    • ExpandoObject
    • EqualityComparer
    • Universal Dictionary serializer (see below)
  • A new dictionary serializer was created to:
    • Allow inheriting any class from Dictionary<,>
    • Serialize the comparer
    • This new serializer requires a parameter less constructor

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%