Swifter.Json .Net platform could be by far the best performance of Json serialization library [open source]

About Json
Json (JavaScript Object Notation) is a lightweight data interchange format. As it is currently the most popular data interchange format, is also a major battleground open source contributors, such as: Ali Dad's fastjson (java), Tencent rapidjson (c ++) and so on. But .Net has not been favored by manufacturers, before the Swifter.Json .Net Json parsing libraries are not perfect.
 
 
Swifter.Json Profile
Swifter.Json on .Net platform is a powerful, easy to use, stable and high-performance Json serialization and de-serialization tool.
Has been open source, Github: https://github.com/Dogwei/Swifter.Json
 
The power of place Swifter.Json
1: All the .Net object structures are known, including the depth of the cyclic structure, the type of reference attributes.
2: supports almost all common data types, and multi-program easily customize serialization behavior defined type, follow-up will continue to increase.
3: Support Json retracted, the value 0 is ignored Null value "" value or the like, supports the use of { "$ Ref": "# / Target"} represents a repeating reference, or the like Null into circular reference sequence, to set the maximum depth of the support.
4: Support .Net Core 2.0 + ,. Net Framework 2.0 + ,. Net Standard 2.0 +, Xamarin, Unify, Mono platforms.
5: Swifter.Json almost no BUG, ​​because it has more on-line projects in operation, and after every release of our own unit tests and Newtonsoft.Json and Spanjson unit tests to ensure its stability, if you having problems, you can publish a issue on Github, we will do our best to help you.
6: a complete and comprehensive API Chinese document, each of the type disclosed and methods have Chinese instructions, but also Wiki documentation on Github (now mainly maintenance documentation).
 
Why repeat-create the wheel?
Currently Json library on the .Net platform, there are some significant drawbacks: Some are simple to use, but performance is not high, the low number of high performance is not stable, stable performance and there is too complicated.
We urgently need a strong, stable, high performance and easy to use Json serialization tool!
So Swifter.Json was made out.
 
Swifter.Json library references
Swifter.Core: This is a toolkit that can provide significant help for library developers, Swifter.Json based on it. It provides efficient data read and write API, efficient mathematical algorithms and .Net CLR no data information, and to resolve discrepancies between the platform version, the latter will be based on this library we developed a Swifter.MessagePack (already well developed, to be published). This library between 300 ~ 400KB (There are differences in each platform).
Swifter.Unsafe: This is a library written in IL code, because gives the same functionality similar to that provided System.Runtime.ComplierServices.Unsafe, it's called Swifter.Unsafe, this large library generous 5KB.
Swifter.Json: Swifter.Json achieve the IValueReader, IValueWriter i.e. realized execution sequence and deserialize any objects, the main code JsonSerializer (implemented IValueWriter) and JsonDeserializer (implemented IValueReader) in, JsonFormatter provides API overloaded, now It has full support for asynchronous API. This library is about 86KB.
 
Swifter.Json performance
.Net Core test results of 3.0 Preview 7
Compared Newtonsoft.Json increased by about 5-10 times, although there are many Json library is known as a high-performance, but in fact I recognized except Swifter.Json only Spanjson, but it's too obvious shortcomings, only supports .Net Core 2.1+ and good stability. If you do not want to use Swifter.Json, then I suggest that you use Newtonsoft.Json, after all, it is all in addition to performance advantages.
There is also a closely related one characteristic properties: small allocations. By definition is allocated memory size, for example: when the program is executed array deserialization operation, because of the length of the array is unknown, so most Json tools to create a larger array in the process is repeated, this process is time consuming and consuming resources. Swifter.Json pool technology has been used to solve this problem perfectly. Spanjson also use ArrayPool pool on Core resolved, so I ordered a small star to Spanjson.
 
Simple to use
 
 
More usage and documentation on Github please see Wiki.
 
Finally, we attach a simple .Net platform for evaluation of existing library Json
 
 
Thanks for reading!

Guess you like

Origin www.cnblogs.com/Dogwei/p/11444426.html