JamesNK / Newtonsoft.Json

Json.NET is a popular high-performance JSON framework for .NET
https://www.newtonsoft.com/json
MIT License
10.64k stars 3.24k forks source link

Author fuzz tests and fix a comment-related issue #2935

Closed Porges closed 3 months ago

Porges commented 5 months ago

Add some basic fuzz tests:

The latter test found an issue regarding comments where the line comment // with a */ would end up being serialized as /* with a */*/ which broke things. The fix I've implemented for this is to detect this case and serialize it as a line comment. This changes the existing behaviour in another existing unit test.