Back in the day, we mostly used Newtonsoft.Json.
It was flexible, but not the fastest.
Now in ASP.NET 8, the built-in System.Text.Json is 🔥 optimized for speed & memory.
Then (Newtonsoft.Json)
var json = JsonConvert.SerializeObject(myObject);
Now (System.Text.Json)
var json = JsonSerializer.Serialize(myObject);
🚀 Benchmarks
50–70% faster than Newtonsoft
Much lower memory allocations
Built-in for all ASP.NET APIs (no extra package)
✅ For most apps, System.Text.Json is the best choice.
✅ Use Newtonsoft.Json only if you need advanced features (e.g., polymorphic serialization).
Pro tip: In .NET 8, System.Text.Json now supports required properties, polymorphism, and contract customization — so even fewer reasons to use Newtonsoft.
👉 Question: Are you still using Newtonsoft.Json in your ASP.NET projects, or have you switched completely?