-
Notifications
You must be signed in to change notification settings - Fork 91
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
Upgrade to Orchard Core 2.0 once it's released and remove Newtonsoft.Json from the code base (OCC-194) #362
Comments
Orchard Core is still using Newtonsoft Json.NET because of YesSQL but for sure if all the JSON stuff is implemented in STJ then the STJ wins IMHO we could use STJ all over places if all agree I might have a look to related issue in YesSQL to use STJ |
Is there an open issue tracking the transition from Json.NET to STJ in Orchard Core? I can't find one, that's the main reason why I assumed it's off in the far future. I found an open YesSql issue for moving to STJ (sebastienros/yessql#227), but it hasn't been touched since 2020. If we can get the move to STJ started for YesSQL and OC then I'm all for it (and would like to get involved). But if it will be stuck in limbo for much longer then I'd still prefer to cut down on duplicate code in the meantime. |
I might check that issue again, so for now I think we can go with STJ if you don't mind or we will rid off STJ until we finish all the things in YesSQL |
Be careful, in my practice, not all kind of data would be processed by STJ easily. IMO, just keep using Newton, at least for a while. do not waste time to to modify the not high priority issues . after all the stuff of this project are ok, then consider transfer to STJ |
Orchard Core 2.0 will finally migrate to System.Text.Json and drop Newtonsoft.Json support. This much anticipated event should be followed up in Orchard Core Commerce as well.
Blocking:
Obsolete description:
Is your feature request related to a problem? Please describe
Currently OCC has serialization via Newtonsoft Json.NET and System.Text.Json. Both are actually used in different places. This makes things unnecessarily complicated as serializers have to be implemented in two different frameworks.
Describe the solution you'd like
Orchard Core still uses Json.NET at the core of its content system (see) and so do many other third party modules and libraries that build on OC. While the OC team has expressed intent to eventually switch over to STJ, this is not in the near future. Additionally based on previous comments (for example here) we might want to rewrite the STJ implementation from scratch if this ever happens.
In the meantime, we should do the following to make the code more maintainable and approachable:
ShoppingCartSerializer
,IProductAttributeProvider
and any other file whereusing System.Text.Json;
is found to use Json.NET instead.Describe alternatives you've considered
Alternatively we may fully commit to STJ-only, but I think at this point this would be premature, an enormous technical debt and a source of future headaches.
Jira issue
The text was updated successfully, but these errors were encountered: