BT

Json.NET 8 Introduces ArrayPools for Performance Gains

| by Jeff Martin Follow 16 Followers on Jan 20, 2016. Estimated reading time: less than one minute |

Json.NET creator James Newton-King has produced the 8th version, and is focused on improving performance to match what he feels is a broader performance-based intiaitive in the .NET ecosystem as a whole.  For this release (its first since June 2015), Json.NET is doing so by adding a new interface that is intended “to reduce allocations and memory usage when serializing”.

Called IArrayPool, this interface lets Json.NET to reuse array buffers which provides the foundation for the performance gains.  Newton-King calls this “a somewhat experimental feature” so only those who currently have a need should enable it.

Another change for version 8 is that comments in the JSON that is being read into JArrays are now ignored.  This change is being done to eliminate a common source of errors, but the previous behavior can be enabled by CommentHandling.Load on JsonLoadSettings.

Beyond these changes version 8 includes over 2 dozen minor bug fixes, unless there is a version specific reason holding you back, consider upgrading to the latest version.  Links to the source code and project files is available on GitHub.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT