I want to understand how Json.NET deserializes a JSON object to corresponding c# object when we have multiple property names with different cases(I know this is not a good practice, but just curious to know how JSON.NET deals with this).
I have a c# object defined as below:
public class TestModel
{
public string Name { get; set; }
public bool IsEmployee { get; set; }
}
And json object as
{ "Name": "TestName","Isemployee":true, "isemployee":false};
Then, if I use the JSON.NET de-serialize method to convert above json string to TestModel object, which one of those two properties will be assigned to IsEmployee
variable? And why?
Thanks.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments