skbkontur / GroBuf

Fast binary serializer
MIT License
64 stars 10 forks source link

GroBuf doesn`t support .Net Core 3.0 #18

Closed ugenef closed 4 years ago

ugenef commented 5 years ago

Following code throws GroBuf.DataCorruptedException: Unexpected end of data exception.

        var dictToSerialize = new Dictionary<string, int>()
        {
            {"1",1},
            {"2",2},
            {"42",42}
        };

        var serializer=new Serializer(new AllPropertiesExtractor(), options: GroBufOptions.WriteEmptyObjects);
        var bytes = serializer.Serialize(dictToSerialize);

        var deserializedDict = serializer.Deserialize<Dictionary<string, int>>(bytes);

Application uses .Net Core 3.0 preview 7, so error seems like some compatibility trouble. Thanks!

AndrewKostousov commented 4 years ago

Fix via PR #20