json-consolidator
is an extension that helps to edit similarly structured json files. Especially handy for i18n
files. At the moment supported and tested only on 1-dimensional (flat) json files.
- Download
vsix
file from VS Code Marketplace Or - Search for
Exxend.json-consolidator
inExtensions
tab of VS Code
- Edit simultaneously multiple json files
- Search along the opened files
- Validation of json keys on save
- Filter by items in error
To open editor window of json-consolidator
you just need to right click on target foldet containing json files and select Json Consolidator - Editor
. Extension will automatically scan for all json files present and display them in editor. Since originally extensions is developed to edit i18n
files, default directories where extension could be triggered are i18n
and locales
, it could be changed be means of extension configuration keys.
This extension contributes the following settings:
json-consolidator.orderKeysOnSave
- defaulttrue
- Controls wether json file keys should be ordered on savejson-consolidator.orderKeysDirection
- defaultAscending
- Ordering direction of json keysjson-consolidator.triggerEverywhere
- defaultfalse
- Controls wether extension could be triggered from any directory, if false triggered only atjson-consolidator.supportedDirectories
json-consolidator.supportedDirectories
- default[ "i18n", "locales" ]
- Names of directories where extension could be triggeredjson-consolidator.targetEditorWindow
- defaultTwo
- Controls in what tab editor should be openedjson-consolidator.suppressInitNotification
- defaultfalse
-Controls wether initialization notification is shown during vscode startup
- Extension does not keep track if files that are currently under edit were modified externally.
- Each time you hit save - all files will be overwritten.
- Not tested on large json files
Tip: always use
json-consolidator
with files insigegit
repo, or make sure to have backups of the files. Even though no issues of losing data were reported - it won't hurt to be more safe!
Inspired by vsce-i18n-json-editor