哪个是更快的asp.net mvc json或json.net?

时间:2021-09-14 04:04:51

I was wondering if anyone has run any benchmark tests on the JSON() function in Asp.net MVC and how it compares to JSON.NET? Also which one outputs the best json strings?

我想知道是否有人对Asp.net MVC中的JSON()函数运行过任何基准测试,它与JSON.NET有什么不同?哪个输出最好的json字符串?

3 个解决方案

#1


12  

There is a performance comparison here. ASP.NET MVC uses the JavaScriptSerializer.

这里有一个性能比较。ASP。NET MVC使用JavaScriptSerializer。

Json.NET gives you more control over outputting JSON (especially around dates) and also has the option for printing indented JSON.

Json。NET提供了对输出JSON的更多控制(特别是关于日期),还可以选择打印缩进的JSON。

#2


2  

i am using the MVC json and it is a very good choice. i used json.net in the past it was good but there is overhead because of the 3 party DLL asp.net 3 + is doing great with json.

我使用的是MVC json,这是一个很好的选择。我以前用过json.net,它很好,但是因为有3个第三方的DLL,所以存在开销。

give it a try ..

试试看。

#3


1  

An author of the ServerStack framework introduced a new JSON serializer for .NET and Mono, and their benchmarks quote higher performance than JSON.NET and WCF JSON Serializer. At first glance it doesn't support a couple of important features from JSON.NET: indented serialized text, and it looks like it requires more code.

ServerStack框架的作者为。net和Mono引入了一个新的JSON序列化器,并且他们的基准引用了比JSON更高的性能。NET和WCF JSON序列化器。乍一看,它不支持JSON提供的一些重要特性。NET:缩进的序列化文本,看起来需要更多的代码。

#1


12  

There is a performance comparison here. ASP.NET MVC uses the JavaScriptSerializer.

这里有一个性能比较。ASP。NET MVC使用JavaScriptSerializer。

Json.NET gives you more control over outputting JSON (especially around dates) and also has the option for printing indented JSON.

Json。NET提供了对输出JSON的更多控制(特别是关于日期),还可以选择打印缩进的JSON。

#2


2  

i am using the MVC json and it is a very good choice. i used json.net in the past it was good but there is overhead because of the 3 party DLL asp.net 3 + is doing great with json.

我使用的是MVC json,这是一个很好的选择。我以前用过json.net,它很好,但是因为有3个第三方的DLL,所以存在开销。

give it a try ..

试试看。

#3


1  

An author of the ServerStack framework introduced a new JSON serializer for .NET and Mono, and their benchmarks quote higher performance than JSON.NET and WCF JSON Serializer. At first glance it doesn't support a couple of important features from JSON.NET: indented serialized text, and it looks like it requires more code.

ServerStack框架的作者为。net和Mono引入了一个新的JSON序列化器,并且他们的基准引用了比JSON更高的性能。NET和WCF JSON序列化器。乍一看,它不支持JSON提供的一些重要特性。NET:缩进的序列化文本,看起来需要更多的代码。