在。net 4.5中有什么新东西可以处理更好的JSON吗?

时间:2022-09-15 12:36:30

Is there anything new about JSON handling in .NET 4.5 and VS2012 that would be better than DataContractJsonSerializer? I have seen something about System.JSON. But is it better?

.NET 4.5和VS2012中的JSON处理有什么比DataContractJsonSerializer更好的新东西吗?我看过System.JSON。但这是更好的吗?

I know there is JSON.NET too, but i am not sure if i am allowed to add another .dll to my project.

我知道有JSON。NET也是,但是我不确定是否允许在我的项目中添加另一个.dll。

2 个解决方案

#1


19  

Check this link:

检查这个链接:

Feature Comparison - Json.NET, DataContractJsonSerializer & JavaScriptSerializer

特征比较,Json。净,DataContractJsonSerializer & JavaScriptSerializer

It has a good feature comparision between Json.NET, DataContractJsonSerializer & JavaScriptSerializer. Just have a look at it & then decide which one to use based on your requirement.

它在Json之间有很好的特性比较。净,DataContractJsonSerializer & JavaScriptSerializer。看看它,然后根据你的需求决定使用哪一个。

Also, check this:

另外,请检查:

ASP.NET MVC 4 & Json.NET :

ASP。NET MVC 4和Json。NET:

We (.Net Team) now use and support the popular Json.NET serializer for handling of JSON data. Json.NET is the default JSON serializer used by ASP.NET Web API and it includes support for data contracts, anonymous types, dynamic types, Dates, TimeSpans, object reference preservation, indenting, camel casing and many other useful serialization features.

我们(。现在使用和支持流行的Json。NET序列化器,用于处理JSON数据。Json。NET是ASP使用的默认JSON序列化器。NET Web API及其包含对数据契约、匿名类型、动态类型、日期、时间间隔、对象引用保存、缩进、驼峰壳和许多其他有用的序列化特性的支持。

#2


4  

You could always use System.Web.Script.Serialization.JavascriptSerializer - I don't know why more people don't use it, it's been there a while.

您可以使用System.Web.Script.Serialization。JavascriptSerializer——我不知道为什么更多的人不使用它,它已经存在一段时间了。

http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx

http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx

#1


19  

Check this link:

检查这个链接:

Feature Comparison - Json.NET, DataContractJsonSerializer & JavaScriptSerializer

特征比较,Json。净,DataContractJsonSerializer & JavaScriptSerializer

It has a good feature comparision between Json.NET, DataContractJsonSerializer & JavaScriptSerializer. Just have a look at it & then decide which one to use based on your requirement.

它在Json之间有很好的特性比较。净,DataContractJsonSerializer & JavaScriptSerializer。看看它,然后根据你的需求决定使用哪一个。

Also, check this:

另外,请检查:

ASP.NET MVC 4 & Json.NET :

ASP。NET MVC 4和Json。NET:

We (.Net Team) now use and support the popular Json.NET serializer for handling of JSON data. Json.NET is the default JSON serializer used by ASP.NET Web API and it includes support for data contracts, anonymous types, dynamic types, Dates, TimeSpans, object reference preservation, indenting, camel casing and many other useful serialization features.

我们(。现在使用和支持流行的Json。NET序列化器,用于处理JSON数据。Json。NET是ASP使用的默认JSON序列化器。NET Web API及其包含对数据契约、匿名类型、动态类型、日期、时间间隔、对象引用保存、缩进、驼峰壳和许多其他有用的序列化特性的支持。

#2


4  

You could always use System.Web.Script.Serialization.JavascriptSerializer - I don't know why more people don't use it, it's been there a while.

您可以使用System.Web.Script.Serialization。JavascriptSerializer——我不知道为什么更多的人不使用它,它已经存在一段时间了。

http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx

http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx