docs: Clarify case sensitivity behavior for JSON keys vs object properties - #23
Conversation
…rties Updated documentation to accurately reflect that: - JSON dictionary keys ARE case-sensitive - C# object properties are case-insensitive - Template authors using JSON should always match exact case This addresses documentation-vs-implementation gap discovered during comprehensive feature audit. ## Changes - docs/for-template-authors/placeholders.md: Expanded case sensitivity section with distinction between JSON keys and object properties - docs/for-template-authors/template-syntax.md: Changed "case-sensitive" to "JSON keys are case-sensitive" for accuracy - docs/for-template-authors/best-practices.md: Clarified "JSON keys are case-sensitive" in error prevention section ## Related Part of documentation audit that also resulted in issue #22 for missing non-boolean format specifier implementations. ## Implementation Details The actual behavior (PropertyPathResolver.cs:143-144) uses BindingFlags.IgnoreCase for object properties but dictionary keys remain case-sensitive by nature of Dictionary<string, object>.
There was a problem hiding this comment.
Pull request overview
This PR clarifies documentation on case sensitivity behavior to distinguish between JSON dictionary keys (case-sensitive) and C# object properties (case-insensitive). The documentation now accurately reflects the implementation while maintaining focus on template authors who primarily work with JSON data.
Key Changes:
- Updates messaging from "placeholder names are case-sensitive" to "JSON keys are case-sensitive" for precision
- Adds a developer note in
placeholders.mdacknowledging that C# object properties may behave differently - Ensures consistent, accurate guidance across all template author documentation
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
docs/for-template-authors/template-syntax.md |
Updated case sensitivity section to specify JSON keys are case-sensitive with guidance to match exact case in JSON data |
docs/for-template-authors/placeholders.md |
Expanded case sensitivity explanation with distinction between JSON keys (case-sensitive) and C# properties (case-insensitive), plus best practice guidance |
docs/for-template-authors/best-practices.md |
Updated best practices header and added explicit guidance to match exact case from JSON data |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| **Note for developers:** If your data comes from code (not JSON files), property names may be case-insensitive depending on how the data is structured. | ||
|
|
||
| **Best practice for template authors:** Always match the exact case used in your JSON keys to avoid confusion and ensure templates work reliably |
There was a problem hiding this comment.
Missing period at the end of the sentence. Should be: "Always match the exact case used in your JSON keys to avoid confusion and ensure templates work reliably."
| **Best practice for template authors:** Always match the exact case used in your JSON keys to avoid confusion and ensure templates work reliably | |
| **Best practice for template authors:** Always match the exact case used in your JSON keys to avoid confusion and ensure templates work reliably. |
Addresses Copilot review comment on PR #23.
|
✅ Fixed! Added missing period at the end of the sentence. Thanks for catching this! |
Summary
Clarifies documentation about case sensitivity to accurately reflect implementation behavior:
Background
During a comprehensive documentation-vs-implementation audit, we discovered that the documentation stated placeholder names are "case-sensitive" without nuance. The actual implementation (see
PropertyPathResolver.cs:143-144) usesBindingFlags.IgnoreCasefor C# object properties, but dictionary keys (JSON data) remain case-sensitive by nature.This created confusion: the documentation was technically correct for JSON users (the primary audience) but incomplete.
Changes
1.
docs/for-template-authors/placeholders.mdBefore:
After:
2.
docs/for-template-authors/template-syntax.mdBefore:
After:
3.
docs/for-template-authors/best-practices.mdBefore:
After:
Why This Matters
For Template Authors (primary audience):
For Developers:
Testing
PropertyPathResolver.csRelated
This fix emerged from a comprehensive documentation audit that also resulted in:
Impact
Checklist: