.NET Performance #2: Newtonsoft vs. System.Text.Json

Did Microsoft finally catch up?

Tobias Streng
6 min readOct 24, 2022
Photo by Glenn Carstens-Peters on Unsplash

Welcome to another episode of the .NET Performance Series. This series features researches, benchmarks and comparisms of many different topics in the .NET world. The focus lies — as the title announces — on performance using the latest .NET 7. You are going to see which method is the fastest to implement specific topics as well as plenty of tips and tricks, how you can maximize your code performance with low effort. If you are interested in these topics, stay tuned!

In this article, we are going to compare the two most prominent json frameworks for .NET:
Newtonsofts Json.NET and Microsofts System.Text.Json.

With over 2.3 billion downloads, Newtonsoft.Json is the most downloaded package on NuGet. System.Text.Json is a little behind with around 600 million downloads. However, we need to consider that System.Text.Json is delivered by default with the .NET SDK since .NET Core 3.1. That being said, Newtonsoft still seems to be the most favoured json framework. Let us find out, if it can keep up to its name or if Microsoft is slowly but surely getting ahead in terms of performance.

Benchmark Scenario

--

--