Automatic JSONC is a Visual Studio Code extension that automatically converts JSONC files (JSON with comments) to standard JSON files based on user-configured glob patterns.
This extension processes JSONC files that match the user-configured glob patterns and converts them to JSON files upon save. This allows you to work with JSONC for your configurations while maintaining compatibility with tools and parsers that require standard JSON files.
By default, the extension targets package.jsonc
files and converts them to package.json
files.
There are no additional requirements to use this extension. However, you will need to have the micromatch
package installed as a dependency. You can do this by running npm install micromatch
.
This extension includes the following configurable setting:
automatic-jsonc.jsoncFilesToTransform
: An array of glob patterns for files to automatically convert from JSONC to JSON. Default value is["**/package.jsonc"]
.
There are no known issues at the moment. If you encounter any issues, please report them on the GitHub repository.
- Added user-facing configuration option "automatic-jsonc.jsoncFilesToTransform" to allow specifying an array of glob patterns for files that should be automatically converted from JSONC to JSON.
Initial release of Automatic JSONC.