Sha256: c91334e83a6ba48825b1ce2aa347a004ab53f0427e411a3cc89b33bca96aa5d7
Contents?: true
Size: 448 Bytes
Versions: 9
Compression:
Stored size: 448 Bytes
Contents
// Depends on jsonlint.js from https://github.com/zaach/jsonlint CodeMirror.jsonValidator = function(text) { var found = []; jsonlint.parseError = function(str, hash) { var loc = hash.loc; found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column), to: CodeMirror.Pos(loc.last_line - 1, loc.last_column), message: str}); }; try { jsonlint.parse(text); } catch(e) {} return found; };
Version data entries
9 entries across 9 versions & 3 rubygems