-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Struct properties that implement IList<T> are unable to hold values on Deserialization #1998
Comments
@layomia this was not fixed on the converters refactor; see #2259 (comment). |
@jozkee @layomia I have just had a look on this issue. My approach is to add a new property for storing elements of value collection type into
Do you think it is a good approach ? If it's the point, I can make a PR for it :) |
How about |
@wzchua |
Properties of a custom struct type that implements
IList<T>
are unable to read values, this is because when we try to add the element into the list, we do it on a copy of said property which is returned byjsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue)
.This issue is probably duplicated also on custom structs that implement
Dictionary
orIDictionary
.This issue does not occur when the value type list is the root object.
I would wait to see if the new converter refactor indirectly fixes this issue.
cc @steveharter, @layomia, @ahsonkhan
Repro:
The text was updated successfully, but these errors were encountered: