Example #1
0
 public void Setup()
 {
     this.h2h2 = new ObjectH2H2();
     this.utf8 = TinyhandSerializer.SerializeToUtf8(this.h2h2);
     this.json = JsonSerializer.SerializeToUtf8Bytes(this.h2h2);
     this.simple = TinyhandSerializerOptions.Standard.WithCompose(TinyhandComposeOption.Simple);
 }
Example #2
0
        public void Setup()
        {
            this.h2h = new ObjectH2H();
            this.data = MessagePack.MessagePackSerializer.Serialize(this.h2h);
            this.utf8 = TinyhandSerializer.SerializeToUtf8(this.h2h);

            this.h2h2 = new ObjectH2H2();
            this.data2 = MessagePack.MessagePackSerializer.Serialize(this.h2h2);
            this.utf8b = TinyhandSerializer.SerializeToUtf8(this.h2h2);
            this.json = JsonSerializer.SerializeToUtf8Bytes(this.h2h2);

            // var c = JsonSerializer.Deserialize<ObjectH2H2>(System.Text.Encoding.UTF8.GetBytes("{ \"X\":0,\"Y\":0,\"Z\":0,\"A\":\"H2Htest\",\"B\":[0,1,2,3,4,5,6,7,8,9]}"));

            this.data3 = this.SerializeProtoBuf();
        }