GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Suremaker/ObjectSerialization-Net at d37c8203c520198b90851562bfbae80d64cac83f

BranchesTags
Open more actions menu

Latest commit

 

History

60 Commits
60 Commits

Folders and files

NameName
Last commit message
Last commit date
ObjectSerialization.Performance
ObjectSerialization.Performance
 
 
ObjectSerialization.UT
ObjectSerialization.UT
 
 
ObjectSerialization
ObjectSerialization
 
 
PerformanceResults
PerformanceResults
 
 
packages
packages
 
 
.gitignore
.gitignore
 
 
Changelog.txt
Changelog.txt
 
 
LICENSE.txt
LICENSE.txt
 
 
ObjectSerialization.sln
ObjectSerialization.sln
 
 
README.md
README.md
 
 

Repository files navigation

ObjectSerialization-Net

A fast object graph binary serialization for .NET.

Features:

  • support for serialization of classes, structures and primitives at root or type member level;
  • support for serialization of derived types referenced by interface, base class or abstract class type;
  • support for serialization of POCO objects;
  • support for standard NonSerializedAttribute and dedicated NonSerializedBackendAttribute for automatic properties;
  • support for serialization of classes without parameter-less constructor;
  • support for serialization of arrays and collections implementing ICollection<T>;

Usage:

IObjectSerializer serializer = new ObjectSerializer();

MyClass myObject = new MyClass { Number = 32, Double = 3.14, Text = "test" };

byte[] serializedData = serializer.Serialize(myObject);

MyClass deserialized = serializer.Deserialize<MyClass>(serializedData);

Limitations:

  • if multiple fields refers to the same object instance, after deserialization each would be referring to own copy of it;
  • serialization of object with circular references is not supported (because of above);
  • serialization of readonly fields is not supported (such field has to be marked with NonSerializedAttribute or readonly modifier has to be removed);
  • if class does not contain parameter-less constructor, it would be instantiated without any constructor call;

Performance and serialized data size:

The ObjectSerializer performs serialization/deserialization faster than standard BinaryFormatter and produces smaller data.

Solution contains ObjectSerialization.Performance project that allows to compare ObjectSerializer performance with other serializers like (BinaryFormatter, DataContractSerializer, Protobuf or Newton BSON).

The last performance comparison can be found here: Performance test results

About

A fast object graph binary serialization for .NET

Resources

Readme
License
Activity

Stars

6 stars

Watchers

3 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.