Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SortedList<long,float?> and SortedList<long,double?> Deserializes incorrectly #324

Open
YogiCoder8888 opened this issue Aug 19, 2024 · 1 comment

Comments

@YogiCoder8888
Copy link

I serialized a SortedList<long,float?> with the follow code:

var data = new SortedList<long, float?>();

//.. code to populate data

using (var fs = new FileStream(filepath, FileMode.Create))
{
    await MemoryPackSerializer.SerializeAsync(fs, data);
}

However, when I deserizalised it, the values in the sorted list are incorrect.

using (var readStream = new FileStream(filepath, FileMode.Open))
{
    results = await MemoryPackSerializer.DeserializeAsync<SortedList<long, float?>>(readStream);
}

The same problem seems to happens with SortedList<long,double?>

Am I doing anything incorrectly which may have caused this?

Thanks!

@neuecc
Copy link
Member

neuecc commented Sep 10, 2024

What does incorrectly mean?
Please provide the details and data that we can reproduce here without omitting the populate data part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants