Lightweight msgpack serialization library
$ dotnet add package msgpack.lightMsgPack.Light is a lightweight MsgPack serialization library.
Simpliest way to start using ProGaudi.MsgPack.Light is to install it from NuGet.
var bytes = MsgPackSerializer.Serialize(value);
var value = MsgPackSerializer.Deserialize<string>(bytes);
If you want to work with your own types, first thing you need - type converter. Example of Beer type converter you can find here. Then you should create create MsgPackContext and register your converter:
var context= new MsgPackContext();
context.RegisterConverter(new BeerConverter());
And then you can serialize:
var bytes = MsgPackSerializer.Serialize(beer, context);
And deserialize:
var beer = MsgPackSerializer.Deserialize<Beer>(bytes, context);
To build MsgPack.Light you have to install dotnet SDK version 1.0.0-preview4-004233 or higher (you can find corresponding build on dotnet/cli project.
After dotnet is installed, run following commands:
git clone https://github.com/progaudi/MsgPack.Light.git
cd MsgPack.Light
dotnet build -c Release -f netstandard1.4 src/msgpack.light/msgpack.light.csproj
dotnet build -c Release -f netcoreapp1.1 tests/msgpack.light.tests/msgpack.light.tests.csproj
dotnet test -c Release --no-build tests/msgpack.light.tests/msgpack.light.tests.csproj
MsgPack.Light should built and all test should be passed.
Linux and OSX build status (it's not possible to separate build status per OS, so if any OS is failing build status will be failing):