JSONC support?
-
Is there a plan to support JSONC (JSON with comments) - see also https://changelog.com/news/jsonc-is-a-superset-of-json-which-supports-comments-6LwR
Visual Studio Code already supports it but it would be nice to have it in NP++ as well.
–hfrmobile
-
There is a backdoor to enable it.
If you have the PythonScript plugin, running
editor.setProperty("lexer.json.allow.comments",1)
will enable that. Or if you have the NppExec plugin,SCI_SENDMSG SCI_SETPROPERTY "lexer.json.allow.comments" "1"
will enable that.Giving non-power-users access to that option, similar to how Notepad++ allows the user to toggle the SQL backslash-as-escape using a checkbox on Settings > Preferences > Language, is a good idea. If you follow the feature request FAQ instructions, you could suggest that to the developers. This was actually discussed in this forum a few years back (which is where I got the NppExec command, and where I previously published the PythonScript command), but the poster at that point didn’t make the effort to put in the feature request, so no one on the development team has thought about adding it. (The “power users” who frequent this forum weren’t as likely to make feature requests back then, because the developer gives more “weight” to requests from normal users like you than he does to “us”. He still gives more weight to you even today, so I will ask that if you care about it, you put in that feature request. You can even just paste the mockup that I showed in the discussion two years ago as part of your feature request.)
If you do create the request, make sure you post a link to it in your reply here.
-
-
-
@Harald-René-Flasch Now is as good a time as any to make a shameless plug of my JSON Tools plugin, which can parse JSONC.
The JSTool plugin is another good option with JSONC parsing ability. I assume it is better for a JavaScript developer and its tree viewer loads faster than mine, but it is a bit less feature-rich when it comes to working with pure JSON.