CDK: allow comments in context.json (via jsonc?)
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
I would like to be able to leave comments in the context.json file. Possibly by allowing [jsonc files](https://fileinfo.com/extension/jsonc).
### Use Case
To be able to leave useful comments in the cdk.json file for other developers to see.
### Proposed Solution
Allow jsonc files as context files
### Other Information
This would be an alternative to https://github.com/aws/aws-cdk/issues/15529
### Acknowledgements
- [X] I may be able to implement this feature request
- [X] This feature might incur a breaking change
### CDK version used
2.142.0
### Environment details (OS name and version, etc.)
MacOS 14.4.1
Contributor guide
Research direction
Start by tracing how cdk.json and context.json are loaded and parsed, then inspect the existing configuration behavior before deciding where JSONC support belongs. Confirm that comments are accepted without breaking existing JSON inputs, and verify the resulting context configuration through the relevant tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100