-
Notifications
You must be signed in to change notification settings - Fork 597
Description
I've been thinking about this for quite a while now. It has always bothered me that Sublime Text's JSON syntax definition allows JavaScript-style comments, which are a clear violation of the standard. Users hand-editing JSON files with Sublime Text might be confused why whatever is parsing the .json
file chokes on the comments that ST highlighted perfectly fine.
In order to make things more canon, I suggest introducing a different syntax for Sublime Text configuration files named "JSON with comments" or "JSONC" that will keep the features of the current JSON definition, while the "JSON" syntax gets comment support removed.
I tried googling for a possible standard for this that might have emerged over the time, but there doesn't seem to be any. I found:
- a
commentjson
python module (also for npm ascomment-json
) - a npm package named
json5
, which makes additional changes to its JSON standard such as allowing trailing commas (same as ST3), single quotes, unquoted object keys and more number formats however
Opinions?