jscedit
v1.2.2
Published
Edit jsonc files (eg: vscode settings.json)
Downloads
3
Readme
jscedit
Edit JSONC files eg: VS Code's settings.json.
JSONC files are JSON but can contain comments and trailing commas. They are a VS Code specific file format.
Uses microsoft/node-jsonc-parser which is more or less the jsonc parser within vscode.
Usage
Add/modify the setting to auto-save files after a delay:
npx jscedit settings.json '{"files.autoSave": "afterDelay"}'
Read/write from stdin/stdout:
printf '{ # comment\n"foo" : "bar", }' | npx jscedit - '{ "k1": "v1" }'
{ # comment
"foo": "bar",
"k1": "v1",
}