I am migrating from using Newtonsoft to the native Json library in .Net Core 3.1. One of my objects has two properties with same name but different casing, as below.
"City": "Pittsburgh",
"city": "Pittsburgh"
While serializing, I am getting the "The JSON property name for collides with another property." error. Newtonsoft seems to be handling this fine or at the very least it seems to be serializing it as it is. Is this possible in System.Text.Json? I am using v4.7.0
Edit: It looks like explicitly setting PropertyNameCaseInsensitive to false solved the issue for me, but I thought this was the default setting.