Difference between json sequence

What are the advantages and disadvantages of using the following two JSON serialization methods:

  • System.Web.Script.Serialization
  • DataContractJsonSerializer
+3
source share
1 answer

DataContractJsonSerializer

The primary purpose of the DataContractJsonSerializer should be used with WCF, since one serialization is a big WCF focus. In addition, it is also better equipped to handle complex classes that have only certain properties available for serialization. This class is more strongly typed, has more knowledge about the type (s) it handles, and improves error handling for poorly formed JSON.

.

JavaScriptSerializer

, , , . , .

+1

Source: https://habr.com/ru/post/1772997/


All Articles