add updated web version
This commit is contained in:
@@ -782,8 +782,12 @@ jsonlint.parse = function(input) {
|
|||||||
dougJSONParse(input);
|
dougJSONParse(input);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
if(/Duplicate key|Bad string|Unexpected/.test(e.message)) {
|
if(/Duplicate key|Bad string|Unexpected/.test(e.message)) {
|
||||||
var lineNumber = input.substring(0, e.at).split('\n').length;
|
var linesUntilError = input.substring(0, e.at).split('\n');
|
||||||
throw SyntaxError(e.message + ' on line ' + lineNumber);
|
var line = linesUntilError.length;
|
||||||
|
var col = linesUntilError[line - 1].length - 1;
|
||||||
|
|
||||||
|
this.parseError(e.message, {line: line, col: col, message: e.message.replace(/./, function(l) { return l.toLowerCase(); })});
|
||||||
|
throw SyntaxError(e.message + ' on line ' + line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user