Skip to content

Error while serializing dictionary #80

@MisterSokol

Description

@MisterSokol

Hi,

There is a problem with serialization and deserialization of dictionaries.

I want to serialize with the Serializer created like this

new NetSerializer.Serializer(new [] { typeof(Dictionary<string, object>) });

but I'm getting an error System.Collections.Generic.KeyNotFoundException: 'Type not found System.Double'

When I add to the serialized types typeof(double) it works for now but then fails on deserialization.

Deserialization with only typeof(Dictionary<string, object>) gives error: System.NullReferenceException in NetSerializer.Serializer.GetDeserializeTrampolineFromId method
And deserializing with typeof(Dictionary<string, object>) and typeof(double) finishes without error but... The deserialized data is trash. Just a single double number instead of dictionary. And the stream position is 4 (didn't went to the end)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions