public void Setup()
        {
            _personToSerialize = new PersonObject()
            {
                FullName = "Riccardo Terrell",
                Birthday = new DateTime(1975, 07, 07),
                Tags     = new Dictionary <string, string>
                {
                    { "Bugghina", "Number one" },
                    { "Stellina", "Number two" }
                }
            };


            _personProtobuf = SerializerHelpers.SerializeProtobuf(_personToSerialize);
            _personJsonNet  = JsonConvert.SerializeObject(_personToSerialize);
            // personJsonNetBuffers = SerializerHelpers.SerializeJsonNetBuffers(_personToSerialize);
            _personJsonText = System.Text.Json.JsonSerializer.Serialize(_personToSerialize);
        }
 public void ProtobufDeserialize()
 {
     SerializerHelpers.DeserializeProtobuf <PersonObject>(_personProtobuf);
 }
Esempio n. 3
0
 public void ProtobufSerialize()
 {
     SerializerHelpers.SerializeProtobuf(personToSerialize);
 }