- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
Investigation: JsonObject PropertyNameCaseInsensitive - Issue Already Fixed #121035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: stephentoub <[email protected]>
| @copilot, it doesn't seem like using  | 
| 
 You're absolutely right. I investigated and confirmed that using  During construction, the  The change doesn't fix any actual bug - it was based on a misunderstanding of the code flow. The original issue description was incomplete, making it difficult to identify a concrete reproduction case. Should I revert this change? | 
| 
 Yes, and then please confirm that the problem cited in the original issue is fixed and that there's a test case covering it. If it's fixed and there's a test case, we can close both the issue and this PR. If it's fixed but there's no test case, please add one. If it's not fixed, please fix it. | 
Co-authored-by: stephentoub <[email protected]>
| 
 Changes reverted in commit 4154eef. Investigation findings: 
 The issue and PR can be closed. | 
Summary
Investigation into reported issue #83766 regarding
JsonObjectconstructor withPropertyNameCaseInsensitiveoption.Investigation Results
After thorough investigation:
The reported issue is already fixed: The
PropertyNameCaseInsensitivefunctionality works correctly with the JsonObject constructor that takesIEnumerable<KeyValuePair<string, JsonNode?>>andJsonNodeOptions. Case-insensitive lookups function as expected.Test coverage exists: The existing test
TestJsonNodeOptionsSetalready validates this scenario:PropertyNameCaseInsensitive = truenew JsonObject(props, options)Assert.Equal("World", (string)jObject["hello"])No bug was present: Testing confirmed that using the
optionsparameter vs theOptionsproperty makes no behavioral difference in the constructor context, as theOptionsproperty simply returns the_optionsfield set by the baseJsonNode(options)constructor.Conclusion
The issue can be closed as the functionality works correctly and has adequate test coverage. No code changes are needed.
Related to #83766
Original prompt
Fixes #83766
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.