Newtonsoft.Json vs System.Text.Json: Which one's faster?
ฝัง
- เผยแพร่เมื่อ 17 ต.ค. 2024
- I compared the performance of Newtonsoft.Json and System.Text.Json, two popular .NET JSON libraries.
Check this video, if you are interested in the results.
👍 If you found this video helpful, don't forget to give it a thumbs up, subscribe for more content, and hit the notification bell to stay updated with my latest videos!
🙏 Thanks for watching, and happy coding! 💻🚀
#dotnet #coding #json #csharp #serialization
Nice video. We do not have any alternative of SearchToken in System.Text.Json to query.
Thank you for your comment:) Yes, unfortunately some features of Newtonsoft.Json don‘t have an equivalent in System.Text.Json
debug mode benchmarks is useless. Also, without even basic complex types such as dictionary which adds overhead... then your testing minimums which isnt a good benchmark.
Thank you for sharing your opinion. I partially agree. Release mode benchmarks are better, that's why I did other benchmarks in release mode in later videos. I still don't think they are useless, they still show the performance difference between Newtonsoft.Json and System.Text.Json.
Regarding complex types: Of course, to get a full picture of the performance differences, you need to test it with more realistic data, but that depends very much on your specific scenario. This video should give you a basic idea of the performance differences between these two JSON serializers.