Browse by Tags

The big feature of this release is improved performance. For the first time in a couple of years I’ve sat down and benchmarked, profiled and tuned Json.NET. For all its features Json.NET was already fast but there are improvements in JsonTextReader which I rewrote and object deserilization. Json.NET is faster than both .NET framework JSON serializers in all scenarios again. Improved error messages...

This release contains bug fixes and some minor changes. Custom type names with TypeNameHandling Note that support for custom type names was added in a previous Json.NET release. One commonly asked for feature is the ability to customize the value of the $type property when using TypeNameHandling. Fortunately new in .NET 4 is the virtual SerializationBinder.BindToName method that translates a Type to...

One of Json.NET’s most popular features - LINQ to JSON – has gotten a speed boost. Previously the LINQ to JSON collection objects (JObject and JArray) internally used a linked list to keep track of their children. While this gave them complete control over the order of properties inside objects, it made lookups by key (a property name for an object, an index for an array) slow over large JSON documents...

Improved BSON Performance BSON performance has improved markedly in R7. Deserializing is as fast as it was before (i.e. ridiculously fast) but writing BSON has gotten a big boost when writing large complex objects. Using an extreme example this benchmark compares the previous release with the new BSON serializer: ShouldSerialize Did you know that the good old XmlSerializer had support for conditionally...

Binary data and text file formats (JSON, XML) don’t tend get along. To be included in JSON or XML binary data has to be encode into a text friendly format, generally base64 , which creates overhead both in the time spent encoding/decoding binary, and the extra size of the text encoded data in the message. {   "binary": "SGVsbG8gV29ybGQ=" } The Test In our test we’ll compare... More Posts Next page »