-
Notifications
You must be signed in to change notification settings - Fork 39
Support comment in json key value #685
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for JSON comments in Azure App Configuration key values by enabling comment parsing in the JSON key value adapter. The implementation allows both single-line (//) and multi-line (/* */) comments to be properly handled when processing JSON configuration values.
- Configures JSON parsing to skip comments during processing
- Adds comprehensive test coverage for various comment scenarios including edge cases
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| JsonKeyValueAdapter.cs | Adds JsonDocumentOptions with CommentHandling.Skip to enable comment support in JSON parsing |
| JsonContentTypeTests.cs | Adds comprehensive test cases covering mixed comment styles, edge cases, and invalid JSON scenarios |
src/Microsoft.Extensions.Configuration.AzureAppConfiguration/JsonKeyValueAdapter.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love that this is so straightforward.
src/Microsoft.Extensions.Configuration.AzureAppConfiguration/JsonKeyValueAdapter.cs
Outdated
Show resolved
Hide resolved
eb86aea
eb86aea to
5ab8381
Compare
* Merge pull request #684 from Azure/zhiyuanliang/fix-test Fix activity source test bug * Fix bug with endpoint failover (#686) * update endpoint in do while * add test * in progress * update test, update logic to backoff using correct endpoint * make test more specific --------- Co-authored-by: AMER JUSUPOVIC <[email protected]> Co-authored-by: Amer Jusupovic <[email protected]> * Support comment in json key value (#685) * support jsonc * remove unused reference * use private static option * Add request tracing for Aspire usage (#687) * add request tracing for aspire component * update tag name * version bump 8.4.0 (#690) --------- Co-authored-by: AMER JUSUPOVIC <[email protected]> Co-authored-by: Amer Jusupovic <[email protected]>
Why this PR?
#671