-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Json serialization problem on System.Text.Json #3190
Comments
I personally recommend the first option, which gives more flexibility while reducing the possibility of other dependencies. |
A quick check shows that there are other usages of the
Whether these are all candidates for Json serialization with System.Text.Json I can't say. |
Does anyone have any suggestions? |
Seeing as As a work around until this is fixed in a better way, one way or another, the following hack can work for the special case of serializing a
|
Yeah probably time we bite the bullet and swap to using full on system.text.json. |
<!-- Please be sure to read the [Contribute](https://github.com/reactiveui/reactiveui#contribute) section of the README --> **What kind of change does this PR introduce?** <!-- Bug fix, feature, docs update, ... --> Feature #3190 **What is the current behaviour?** <!-- You can also link to an open issue here. --> No support for System.Text.Json **What is the new behaviour?** <!-- If this is a feature change --> System.Text.Json support for Serialization added https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft?pivots=dotnet-7-0 **What might this PR break?** If other Serializers are used verification of correct serialisation should be confirmed **Please check if the PR fulfills these requirements** - [x] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) **Other information**:
We have added support for System.Text.Json, please raise a new issue with any new findings, thank you |
goooooooooooooooooooooooooood !!! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
System.Text.Json
does not use theSystem.Runtime.Serialization.IgnoreDataMember
attribute, it uses theSystem.Text.Json.Serialization.JsonIgnore
attribute defined by itself.Therefore,
Changing
andChanged
andThrownExceptions
are serialized.I have two suggestions:
virtual
to allow subclasses to override them.ReactiveObject
andReactiveRecord
classes, add theJsonIgnore
attribute to these three properties, but it needs to reference theSystem.Text.Json
package.FYI. :)
The text was updated successfully, but these errors were encountered: