I am experiencing difficulties with using MsgPack custom serializer in C#. Say, I have the following class:
public class A
{
public int intA;
public string strA;
public B nestedB;
}
public class B
{
public string strB;
public int intB;
}
I am writing custom deserializer for class A. So my method looks like:
protected override A UnpackFromCore(Unpacker unpacker)
{
int inta;
unpacker.ReadInt32(out inta);
string stra;
unpacker.ReadString(out stra);
B b = new B;
// ??? How to get B from unpacker
unpacker.?????(b);
}
Everything goes fine with primitive types, but how to extract instance of class B from unpacker? Wiki documentation is quite poor, and not to much information on the Internet regarding MessagePack C# implementation. Any kind of help or advice would be greatly appreciated.