forked from lxm_front/jsonlint-mod
Minor enhancements
This commit is contained in:
@@ -781,8 +781,7 @@ jsonlint.parse = function(input) {
|
||||
try {
|
||||
dougJSONParse(input);
|
||||
} catch(e) {
|
||||
console.log(e.message);
|
||||
if(/Duplicate key|Bad string/.test(e.message)) {
|
||||
if(/Duplicate key|Bad string|Unexpected/.test(e.message)) {
|
||||
var lineNumber = input.substring(0, e.at).split('\n').length;
|
||||
throw SyntaxError(e.message + ' on line ' + lineNumber);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user