When deserializing JSON from within a C# program, should I ever need to use anything other than JavaScriptSerializer?

前端 未结 3 2095
广开言路
广开言路 2021-02-15 16:11

.NET provides the JavaScriptSerializer class in the System.Web.Script.Serialization namespace. (provided in System.Web.Extensions.dll)

It was originally intended to sup

3条回答
  •  星月不相逢
    2021-02-15 16:48

    I wouldn't use the serializer supplied by .Net. Look at this post to see why:

    http://www.reddit.com/r/linux/comments/epd5z/microsoft_standards_and_incompatibility_19912010/c19v88j

    And the reason JSON.Net exists is JavaScriptSerializer didn't appear until .Net 3.5. JSON.Net existed before then.

提交回复
热议问题