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
var serializer = new Serializer(new AllPropertiesExtractor());
var dict = new Dictionary<(string, string), string>
{
{("k11", "k12"), "v1"},
{("k21", "k22"), "v2"}
};
var bytes = serializer.Serialize(dict);
serializer.Deserialize<Dictionary<(string, string), string>>(bytes);
fails with:
System.ArgumentException : An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Read_Dictionary`2_7baa8df0-d792-4e03-bc5a-1291b06478b5(IntPtr , Int32& , Dictionary`2& , ReaderContext )
at 7884d4f6-1cd8-4766-9648-ca5616cb25c2(IntPtr , Int32& , Dictionary`2& , ReaderContext )
at GroBuf.GroBufReader.Read[T](IntPtr data, Int32& index, Int32 length, T& result) in C:\projects\open-source\skbkontur\GroBuf\GroBuf\GroBufReader.cs:line 98
at GroBuf.GroBufReader.Read[T](Byte[] data, T& result) in C:\projects\open-source\skbkontur\GroBuf\GroBuf\GroBufReader.cs:line 45
at GroBuf.GroBufReader.Read[T](Byte[] data) in C:\projects\open-source\skbkontur\GroBuf\GroBuf\GroBufReader.cs:line 75
at GroBuf.Serializer.Deserialize[T](Byte[] data) in C:\projects\open-source\skbkontur\GroBuf\GroBuf\Serializer.cs:line 50
serializer = new Serializer(new AllFieldsExtractor()) works as expected though.
The text was updated successfully, but these errors were encountered:
The following code:
fails with:
serializer = new Serializer(new AllFieldsExtractor())
works as expected though.The text was updated successfully, but these errors were encountered: