MessagePack serializer the alternative to JSON serializer
Tags: msgpack
Published: 2024-01-19 20:32:46

MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON. But it's faster and smaller. Small integers are encoded into a single byte, and typical short strings require only one extra byte in addition to the strings themselves.

[msgpack.js](https://github.com/ygoe/msgpack.js)
Here is a demo in JS :[DEMOJS](https://flems.io/#0=N4IgzgxgTg9gNnEAuA2gRgOwCYAsAaABgF08QAzASzgFMxkVQA7AQwFtrkQA6ACwBdWiUhBiM+1MZxABfPEzYckIVmADmXAFZ1ho8ZKUAKMgFdGEPhVEACAwEorwADqNHfRyGNhqVsHygVzdwBuZ1C+AHpwqwBlan9mOAoAL1orZisANwTjbz4YNKsAWVowZlVqAAVmCABrKwAjAE9xNKgoZkauMMjuqIATZj5mJCsAFR5vLLgcqzyfOIoE5OouMZ4KMCsIZkYG73TIBOYoPFb2xqsYKEv6jWpzLpcIqJgABwtRMBGAQV2YW-ufFmPEGVj61EojFSzD6fQoHxYcEu70sjDAj1ckSsAForKxjHALK8aCMDPUYPBqDt7ABJRhw7biTYAdwmfAm13xhIoxMm2VSFF2AyGrW8IjMgwkkr6s3yXKJNCKJTKlWqdWO53RVgAIhDmAS+CMyAkvBjnjirIKphQ+qNGq9qAAlajE6rUdhiJC9Kw+gw7Rr2cZ86a5EFAjZWTzUGVzKAuuBuzL8zYwMiRtHGV6vK7iGP22hmrG+kxmBH2b5WEvmVHA0FxvjGKBonzGCA8ApTHKnVQUDISYHeK4UHuIpMhtKbV7HBTiKBmqsI+bxRIpAzC5inN4IsD2JxPVwUNMGLeozYAMjPyO3XHlPMVF6sAEJvm0OlwNi-zmvBsxbLuwq4rjsrAzJWFCoEAKJtFcBjuHS1oyscqjGB6QJ8PmIwQQAHg65jRmkuyfh0spLosK7eLevJjjk6LuLYIT7nw0gAXw4q+FY2bMgAzFgVgALxWAQWFoAQoliaJQQ+lYWJYAAejxLE0ECZBwDAgwAELGGQZBxKcKlqXwABqFDUMyDGAXwSlnMRAngVY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A8onKqUt0DlKlA5IPoBcCFUrRagqgWAL9CQD1AWEasH0CIFUhQAkAVwHYOUAYg+h0oYgIrssCQBoAuAXEOMKwAYhdJBQ49IEEKo8aZrHuOavNQWrTU+gpw21QKDkprXug61eIJCIKAhGZI8grAJAFgFrWfK7ofQdkEgGPyiRXgWEIteUnZVwF6kPoOEGAFdCNAkAgoRIFCAhHfDY1VgIdSOuPwFqsV9qtJU6s4BGic1WAGQCQAKUKBOAXHeqmqBkBAA)



```js
var sourceData = {
    aaa:123,
    number2: -0.129,
    text: "Abc with Üñıçôðé and ユニコード",
    flag: true,
    list: [ 1, 2, 3 ],
    obj: { a: 1, b: "2", c: false, d: { a: 0, b: -1 } },
    time: Date.now()
};

const bytes = msgpack.serialize(sourceData);

const data = msgpack.deserialize(bytes)

Object.keys(data).forEach(k => {
  document.write(`<div class="key">${k}</div> : ${data[k]}<br />`)
})

```

Here is a msgpack converter for JS : [msgpack-converter](https://github.com/ref45638/msgpack-converter)


[MessagePack-Csharp](https://github.com/MessagePack-CSharp/MessagePack-CSharp#serialization-callback)
Here is a demo in c# : [DEMOCS](https://dotnetfiddle.net/90y6La)

```csharp
using System;

using MessagePack;

[MessagePackObject]
public class MyClass
{
    // Key attributes take a serialization index (or string name)
    // The values must be unique and versioning has to be considered as well.
    // Keys are described in later sections in more detail.
    [Key("age")]
    public int Age { get; set; }

    [Key("prenom")]
    public string FirstName { get; set; }

    [Key("nom")]
    public string LastName { get; set; }

    // All fields or properties that should not be serialized must be annotated with [IgnoreMember].
    [IgnoreMember]
    public string FullName { get { return FirstName + LastName; } }
}

public class Program
{
    public static void Main()
    {
       var mc = new MyClass
        {
            Age = 99,
            FirstName = "hoge",
            LastName = "huga",
        };

        // Call Serialize/Deserialize, that's all.
        byte[] bytes = MessagePackSerializer.Serialize(mc);
        MyClass mc2 = MessagePackSerializer.Deserialize<MyClass>(bytes);

        // You can dump MessagePack binary blobs to human readable json.
        // Using indexed keys (as opposed to string keys) will serialize to MessagePack arrays,
        // hence property names are not available.
        // [99,"hoge","huga"]
        var json = MessagePackSerializer.ConvertToJson(bytes);
        Console.WriteLine(json);
    }
}

```