Investigation: JsonObject PropertyNameCaseInsensitive - Issue Already Fixed#121035
Investigation: JsonObject PropertyNameCaseInsensitive - Issue Already Fixed#121035
Conversation
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
|
@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 <2642209+stephentoub@users.noreply.github.com>
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.