Please describe the feature/enhancement in as much detail as possible.
Recent Microsoft documents show some advantages of the System.Text.Json library such as high performance ... Although I do not deny that Newtonsoft.Json is still too good and popular, however We can replace it for a better Flurl library, limiting the dependencies of external packages
Note that Flurl support net45;net46;netstandard1.1;netstandard1.3, which should be dropped to support System.Text.Json. Or use two json libs in same time for different targets.
No, there are still limitations with MS Json compared to newtonsoft
I have found an ISerialize interface, so can I implement members of this interface when using with System.Text.Json?
I've heard this request before and there's definitely interest in it, but I agree with all the drawbacks as well. Aside from platform support, I'm worried I'd break a lot of people who use Json.NET's serialization attributes, global settings, etc. To do it right would probably mean releasing multiple packages. For now, I don't see the payoff being worthwhile. But I could see that changing at some point. I'll keep this issue open as a placeholder.
@tmenier agreed, no need for surprises related to serialization/deserialization for now :)
@mincasoft Yes, you can definitely swap out Newtonsoft for System.Text.Json today: https://flurl.dev/docs/configuration/#serializers
For most people though, I'm pretty sure the motivation is to eliminate the Newtonsoft dependency and/or reduce the payload size. This doesn't accomplish that, but it's a way to use the MS's lib if you want to.
Please leave Newtonsoft, as there is not enough support in Core 3.1, yet. Thanks.
Using Flurl at enterprises has been difficult because of the Newtonsoft dependency being newer than the version they have been using for years in other applications and a fear of upgrades.
A version that only depended upon System.Text.Json might be a way to avoid that dependency issue (even if it means that they have two JSON libraries instead of one).
I'm confident this will happen in future major release, but it isn't gonna make the 3.0 cut. I could see an optional Flurl.Http.Newtonsoft package or something for those who want to stick with Json.NET.
+1 for the change.
Most helpful comment
I'm confident this will happen in future major release, but it isn't gonna make the 3.0 cut. I could see an optional
Flurl.Http.Newtonsoftpackage or something for those who want to stick with Json.NET.