Replace WCF default JSON serialization

前端 未结 2 464
梦谈多话
梦谈多话 2020-11-28 14:46

Is it possible to replace the default JSON serialization of WCF (I\'m currently testing with the webHttp behaviour), and passing application/json a

2条回答
  •  孤独总比滥情好
    2020-11-28 15:13

    You can use a message formatter to change the serializer used to deal with JSON. The post at https://docs.microsoft.com/en-us/archive/blogs/carlosfigueira/wcf-extensibility-message-formatters shows an example on how to change the default serializer (DataContractJsonSerializer) to another one (JSON.NET).

提交回复
热议问题