/BinaryFormatter

Primary LanguageC#OtherNOASSERTION

BinaryFormatter Build status (Not supported)

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.

Supported types

  • char
  • (s)byte
  • (u)short
  • (u)int
  • (u)long
  • float
  • double
  • bool
  • decimal
  • DateTime
  • byte[]
  • classes

Not supported types

  • Collections
  • structures

Installation

$ Install-Package BinaryFormatter

Serialization

BinaryConverter converter = new BinaryConverter();
byte[] byteArray = converter.Serialize(model);

Deserialization

BinaryConverter converter = new BinaryConverter();
TzpeViewModel obj = converter.Deserialize<TzpeViewModel>(byteArray);

License

MIT