Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

replace WCF built-in JavascriptSerializer with Newtonsoft Json.Net json serializer

Is there any way to replace the WCF service application built-in JavascriptSerializer with Newtonsoft Json.Net json serializer?

like image 754
iNc0ming Avatar asked Jun 22 '12 09:06

iNc0ming


People also ask

Is Newtonsoft JSON still supported?

Yet Newtonsoft. Json was basically scrapped by Microsoft with the coming of . NET Core 3.0 in favor of its newer offering designed for better performance, System. Text.

Which is better Newtonsoft JSON or System text JSON?

Text. Json is much faster than the Newtonsoft. Json.

Is JSON net the same as Newtonsoft JSON?

Json.net is made by newtonsoft.


1 Answers

WCF doesn't use JavascriptSerializer. It uses DataContractJsonSerializer. And yes, you can replace it with Json.NET by writing a custom message formatter as exemplified in the following blog post.

like image 177
Darin Dimitrov Avatar answered Oct 17 '22 04:10

Darin Dimitrov