jsonlint icon indicating copy to clipboard operation
jsonlint copied to clipboard

Ability to lint files w/ JSON comments

Open pdehaan opened this issue 9 years ago • 14 comments

I'm trying to lint some JSON files that happen to have some comments in JSON like this:

// this is configuration specific to aws deployments
{
  // disable statsd for aws
  "statsd": {
    "enabled": false
  }
}

But the $ jsonlint config/aws.json command gives me the following:

$ jsonlint config/aws.json
[Error: Parse error on line 1:
// this is configura
^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined']

I'm not sure what libs mozilla/persona is using to load the commented JSON, but a bunch of the files are failing jsonlint due to the comments.

pdehaan avatar Aug 25 '14 18:08 pdehaan