Source generation in System.Text.Json, should I care?

With the release of .NET 6 also came the option to use source generation in System.Text.Json. In short this means that instead of runtime reflection some of the work is now done compile time. This makes it more efficient. But how much? And should I care? Just measure it. I made a small project that you can use and adjust to measure the difference for your specific case. Let the results help you decide what’s best for your application. ...

21 February 2022 · 3 min · Jos Hendriks