BinaryFormatter is a byte serialized/deserializer for .NET Core, created for Distributed Cache Platform - Kronos. After few days of development, Protobuf-Net (contract base serializer, fork of Google Protobuf) has announcement support for .NET Core.
Windows | Linux |
---|---|
- char
- (s)byte
- (u)short
- (u)int
- (u)long
- float
- double
- bool
- decimal
- DateTime
- TimeSpan
- byte[]
- classes
- collections
- IEnumarable
- IDictionary
- LinkedList
- structures
- guid
- uri
- enum
- KeyValuePair
- BigInteger
- anonymous types
- HashSet
- Array[,], Array[,,], Array[,,,] types
- DateTimeOffset
- Nullable
$ Install-Package BinaryFormatter
var converter = new BinaryConverter();
byte[] byteArray = converter.Serialize(model);
var converter = new BinaryConverter();
ViewModel obj = converter.Deserialize<ViewModel>(byteArray);
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so we don't break it in a future version unintentionally.
- Send a pull request. Bonus points for topic branches.
MIT