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

Issues when a trackable object should be unwrapped to a non-trackable one #23

Closed
mfidemraizer opened this issue Dec 8, 2016 · 1 comment
Assignees
Labels

Comments

@mfidemraizer
Copy link
Owner

I've found issues when calling some.ToUntrackable is the whole object implements IDictionary<TKey, TValue> but it's not intended to be used as a dictionary but it's a DynamicObject like a custom ExpandoObject wannabe.

Since I've implemented unwrapping using JSON serialization (i.e. I'm cloning objects), JSON properties are set as dynamic properties while type's properties should have prioritized over dynamic ones.

@mfidemraizer
Copy link
Owner Author

Solved: it was just about implementing a custom JSON.NET's contract resolver as described on this StackOverflow Q&A: http://stackoverflow.com/questions/40675841/json-net-deserializes-an-object-implementing-idictionarytkey-tvalue-as-dictio

mfidemraizer added a commit that referenced this issue Dec 8, 2016
mfidemraizer added a commit that referenced this issue Dec 8, 2016
@mfidemraizer mfidemraizer self-assigned this Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant