mailjet-apiv3-dotnet
mailjet-apiv3-dotnet copied to clipboard
Can the old Newtonsoft be replaced by System.Text.Json?
.NET Core 3 comes with a new JSON parser. I really don't want to use Newtonsoft alongside with it. Is there an API with e.g. a string
instead of JObject
?
Hi @mc0re Could you explain a bit, do you want to have SDK API that has a more typed interface rather than using JObject, or do you want to eliminate internal dependency to the Newtonsoft json at all?
I'd rather see Newtonsoft dependency abstracted away or eliminated, so the 3.1 projects do not need to have both Newtonsoft and System.Text included. Some types in the two libraries have the same names, and there could be other dependency clashes.
But if that proves difficult, then at least eliminate Newtonsoft on the interface layer.
Both options are really tough, as the first one require changing targets to .net standart 2.0/.net 4.6.2, and the second one requires changing interface of the sdk wrapper. For now seems like "nice to have" feature, but anyway worth considering.
Actually, the 1-st one includes the 2-nd :-) So start with the 2-nd, when you're up to it ;-)
I would also appreciate this being brought up to System.Text.Json in preference to Newtonsoft, as well as re-targeting to .NET Standard 2.0 instead of 1.1.