You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Orchard Core 1.9 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:
OC 1.9 release (couldn't find a release issue in the OC repo)
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:
Remove the STJ converters
If possible, rename the Json.NET converters without the "Legacy" prefix. (if OC ever changes over to STJ we will delete these converters anyway so I don't expect that we should ever have two different sets.
Partially rewrite ShoppingCartSerializer, IProductAttributeProvider and any other file where using 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.
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
sarahelsaig
changed the title
Remove System.Text.Json from the code base (OCC-194)
Upgrade to Orchard Core 1.9 once it's released and remove Newtonsoft.Json from the code base (OCC-194)
Feb 21, 2024
Orchard Core 1.9 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: