-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Populate existing collections by default when deserializing JSON #16628
Conversation
I found that the sessions didn't have this property. Isolated it to these defaults. I want to see if the tests still pass as we might have not set it on purpose, I remember we had issues that STJ was not able to assign new collections and we went with |
Strange that we did not add it. I think it should be added too. I suggest that you add a test case to approve that this fixed the problem we had. |
This is way better than adding another Line 10 in e23ab9e
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @gvkries , PreferredObjectCreationHandling
should be added to JsonSerializerOptionsExtensions.Merge()
and that should be used here instead of manually overwriting each property.
That way you will never have to manually update this configuration from JOptions.Base
if a new setting is added there or something.
...rchardCore/OrchardCore.Abstractions/Extensions/DocumentJsonSerializerOptionsConfiguration.cs
Outdated
Show resolved
Hide resolved
…onSerializerOptionsConfiguration.cs Co-authored-by: Sára El-Saig <sara.el-saig@lombiq.com>
Fixes #16585
@sarahelsaig