![.netcore](https://img.tnblog.net/arcimg/hb/c857299a86d84ee7b26d181a31e58234.jpg ".netcore")
>#.net 聊聊JSON框架的性能对比
[TOC]
环境配置
------------
>.NET Framework 4.7.2
56000多条数据
KoobooJSON
------------
>###Kooboo JSON与Newtonsoft Json序列化对比
>耗时对比
![](https://img.tnblog.net/arcimg/hb/adec169103844069a560b42a52495a4e.png)
>CPU占用率
![](https://img.tnblog.net/arcimg/hb/bfff39885c714c248fcb064b8e16dcdb.png)
>###Kooboo JSON与Newtonsoft Json反序列化对比
>耗时对比
![](https://img.tnblog.net/arcimg/hb/90081def4831444884459d3a93695387.png)
>CPU占用率(第一次)
![](https://img.tnblog.net/arcimg/hb/80ec0703c58547639aea81e356b42493.png)
>CPU占用率(第二次)
![](https://img.tnblog.net/arcimg/hb/23f35f00fda14af6a7aa47aa3ea5b077.png)
>###Kooboo JSON 相关内容
Github: https://github.com/kooboo/Json
Nuget: https://www.nuget.org/packages/Kooboo.Json/
SwifterJSON
------------
>###Swifter JSON与Newtonsoft Json序列化对比
>耗时对比
![](https://img.tnblog.net/arcimg/hb/7e433659dd134e43989f5494abe07587.png)
>CPU占用率
![](https://img.tnblog.net/arcimg/hb/aea1825383944a7c8d9e4f888022a8c2.png)
>###Swifter JSON与Newtonsoft Json反序列化对比
>耗时对比(第一次)
![](https://img.tnblog.net/arcimg/hb/9c6e477c66844cd7a5bff8c91758f9ef.png)
>CPU占用率(第一次)
![](https://img.tnblog.net/arcimg/hb/74b2e6370b84408cb33df77ca05ffcef.png)
>耗时对比(第二次)
![](https://img.tnblog.net/arcimg/hb/5e430e17432a4d8cae198c3b24e74ddb.png)
>CPU占用率(第一次)
![](https://img.tnblog.net/arcimg/hb/c9519131faae4ad0b714b5278b1c9aa6.png)
>###Swifter JSON 相关内容
Github: https://github.com/Dogwei/Swifter.Json
Nuget: https://www.nuget.org/packages/Swifter.Json
表格呈现
------------
>###序列化对比
| 框架名称 | 耗时 | CPU占用率 |
| ------------ | ------------ | ------------ |
| KoobooJSON | 1011.2906ms | 16.79% |
| NewtonsoftJSON | 1442.1246ms-1660.5411ms | 23.39%-25.73% |
| SwifterJSON | 910.5576ms | 9.56% |
>###反序列化对比
| 框架名称 | 耗时 | CPU占用率 |
| ------------ | ------------ | ------------ |
| KoobooJSON | 3265.2612ms | 38.81%-38.72% |
| NewtonsoftJSON | 2358.6967ms-2643.8704ms | 33.47%-41.96% |
| SwifterJSON | 1283.5357ms-1853.5825ms | 22.47%-24.35% |
总结
------------
tn>感觉SwifterJSON比其他的JSON库要强大些,比较片面,如有误请评论区的大佬发言!