1 // Depends on jsonlint.js from https://github.com/zaach/jsonlint
3 CodeMirror.registerHelper("lint", "json", function(text) {
5 jsonlint.parseError = function(str, hash) {
7 found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
8 to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),
11 try { jsonlint.parse(text); }
15 CodeMirror.jsonValidator = CodeMirror.lint.json; // deprecated