Search code examples
.netjsonwcfserializationjson.net

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?


Solution

  • 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.