jsonlint
jsonlint copied to clipboard
Ability to lint files w/ JSON 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.