This is MessagePack serialization/deserialization for CLI (Common Language Infrastructure) implementations such as .NET Framework, Silverlight, Mono (including Moonlight.) This library can be used from ALL CLS compliant languages such as C#, F#, Visual Basic, Iron Pyhton, Iron Ruby, PowerShell, C++/CLI or so.
You can serialize/deserialize objects as following:
- Create serializer via
MessagePackSerializer.Creategeneric method. This method creates dependent types serializers as well. - Invoke serializer as following:
**
Packmethod with destinationStreamand target object for serialization. **Unpackmethod with sourceStream.
// Creates serializer.
var serializer = SerializationContext.Default.GetSerializer<T>();
// Pack obj to stream.
serializer.Pack(stream, obj);
// Unpack from stream.
var unpackedObject = serializer.Unpack(stream);' Creates serializer.
Dim serializer = SerializationContext.Default.GetSerializer(Of T)()
' Pack obj to stream.
serializer.Pack(stream, obj)
' Unpack from stream.
Dim unpackedObject = serializer.Unpack(stream)- Fast and interoperable binary format serialization with simple API.
- Generating pre-compiled assembly for rapid start up.
- Flexible MessagePackObject which represents MessagePack type system naturally.
See wiki
- Binary files distributed via the NuGet package MsgPack.Cli.
- You can extract binary (DLL) file as following:
- Download *.zip file from GitHub Release page.
- Extract it.
- Under the
bindirectory, binaries are there!
- For mono, you can use
net45ornet35drops as you run with. - For Unity,
unity3ddrop is suitable.
-
Install recent Windows SDK (at least, .NET Framework 4 Client Profile and MSBuild is needed.)
Or install Visual Studio or Visual Studio Express.- If you want to build unit test assemblies, install NuGet and then restore NUnit packages.
-
Run:
msbuild MsgPack.sln
Or (for .NET 3.5 drops, Silverlight 4 drops, and Silverlight 5 drops):
msbuild MsgPack.compats.sln
Or open one of above solution files in your IDE and run build command in it.
Open MsgPack.mono.sln with MonoDevelop and then click Build menu item. (Of cource, you can build via xbuild.)
- GitHub Page : http://cli.msgpack.org/
- Wiki (documentation) : https://github.com/msgpack/msgpack-cli/wiki
- API Reference : http://cli.msgpack.org/doc/top.html
- Issue tracker : https://github.com/msgpack/msgpack-cli/issues
- MSBuild reference : http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx
- Mono xbuild reference : http://www.mono-project.com/Microsoft.Build