-
Notifications
You must be signed in to change notification settings - Fork 2k
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
System.Text.Json instead of Newtonsoft Json.NET? #7874
Comments
Orleans uses its own serialization framework for serializing messages between hosts (for good reasons) but has support to delegate to other serialition libraries. For that, it supports System.Text.Json and Newtonsoft.Json already, and gives users full control over how they're configured. The two libraries are far from parity and will not be at parity for the foreseeable future because they are targeted at different scenarios. STJ is much lower-level and much more explicit than Newtonsoft.Json at a cost of developer-friendliness. For persistence providers (distinct from wire serialization), we support pluggable serialization, but we still need to implement that for the remaining providers: #7810 |
Thanks for contacting us. We believe that the question you've raised has been answered. If you still feel a need to continue the discussion, feel free to reopen the issue and add your comments. |
Thanks @ReubenBond. Apologies I wasn't sufficiently specific - I was actually talking about persistence - specifically the DynamoDB provider. So if I understand you correctly, the position going forward for the DynamoDB persistence provider is to continue to use Newtonsoft as the default serializer, but allow a custom serializer to be configured, which would allow STJ to be used? |
The position is that storage providers shouldn't be responsible for serialization. Instead, they should delegate that to |
I'm not particularly fussed about what the default storage serializer is as long as it is configurable. That being said, it would be nice to avoid unnecessarily packaging Newtonsoft Json.NET with my application. My primary concerns/interests wrt using STJ instead of Json.NET are:
|
It looks like a prior proposal to switch to System.Text.Json (STJ) from Newtonsoft Json.NET (#6070) was not accepted due to lack of support for polymorphism in STJ. However, it appears support has now been added for .NET 7. Should replacing Newtonsoft with STJ therefore be re-evaluated?
The text was updated successfully, but these errors were encountered: