-
Notifications
You must be signed in to change notification settings - Fork 29
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
dictionary wrong key #193
Comments
Thanks for the finding. Can you post your object class structure? Thanks, |
I have given the complete example above. It runs like this on LinqPad. |
Sorry, I did not see it initially... thanks |
What happens if you don't set A to null and use a specific instance? |
It should be type B, instead of type A. I changed the example. Any way, it makes no difference whether it is a null or a concrete object. The concrete object is deserialized correct, just the key is a pure random value. |
If I use a int as key and value, the value is deserialized correctly.
=> Key 74613460 Value 777 |
I see. I have never noticed the behavior before. What version are you using? The random value you are getting is the address at runtime that the int value points to before it is set. It looks like the key is not been read from the json even though it is supposed to be. I will look into it tonight. Thanks for the details so far. |
So far I used version 1.2.2. However, with version 1.2.3 I see no difference. Would be great if this could be solved. However, thanks for the quick response! |
Thank you so much for this find. I broke it and did not notice it, but now i have a basic test for it. |
I also went ahead and publish the latest version. |
Great! That was fast. Thank you very much! |
Hey there,
I would like to deserialize a Dictionary. e.g. I serialize a key of 666, but netjson returns a random number e.g. 75082016 (it is every cycle a different key).
Whats' going on here?
The text was updated successfully, but these errors were encountered: