vscode-tmlanguage icon indicating copy to clipboard operation
vscode-tmlanguage copied to clipboard

Does not report trailing commas as JSON errors

Open shdwcat opened this issue 3 years ago • 2 comments

For example, this chunk of JSON is not valid:

	"patterns": [
		{
			"include": "#keywords"
		},
		{
			"include": "#strings"
		}, <-- this comma is an error in standard JSON
	],

It's very easy to miss these and VS Code will not load the language file if errors like this are present.

shdwcat avatar Jul 13 '22 15:07 shdwcat

Apologies for the delay, I will look into it.

pedro-w avatar Jul 19 '22 14:07 pedro-w

Actually I don't know how to do this. I put a bounty on an unanswered question on StackOverflow - it didn't help much but it looks like maybe I have to add a JSON parser as a dependency and make use of that. Which seems weird that I can't make use of the JSON support that VSCode already has built-in. In other words I just want the tmlanguage to be an add-in to JSON editing, not replace it entirely.

pedro-w avatar Sep 06 '22 07:09 pedro-w