function validate (jsonString) {
  if (typeof (jsonlint) !== 'undefined') {
    jsonlint.parse(jsonString)
  } else {
    JSON.parse(jsonString)
  }
}
Validate a string containing a JSON object
This method uses JSONLint to validate the String. If JSONLint is not
available, the built-in JSON parser of the browser is used.
@param {String} jsonString   String with an (invalid) JSON object
@throws Error