You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote simple unit test which check values after deserialization and I got exception on checking value with key [2]:
var incoming = new Dictionary<int, int?>
{
[0] = null,
[1] = 123,
[2] = null,
};
var serializer = new GroBuf.Serializer(
new GroBuf.DataMembersExtracters.AllPropertiesExtractor(),
new GroBuf.DefaultGroBufCustomSerializerCollection(),
GroBuf.GroBufOptions.MergeOnRead | GroBuf.GroBufOptions.WriteEmptyObjects);
var raw = serializer.Serialize(incoming);
var outgoing = serializer.Deserialize<Dictionary<int, int?>>(raw);
outgoing[0].Should().Be(null);
outgoing[1].Should().Be(123);
outgoing[2].Should().Be(null); // Expected <null>, but found 123.
When I use nullable-values by default such as "string" then deserialization work correct.
The text was updated successfully, but these errors were encountered:
I wrote simple unit test which check values after deserialization and I got exception on checking value with key [2]:
When I use nullable-values by default such as "string" then deserialization work correct.
The text was updated successfully, but these errors were encountered: