loadJSON.js
function loadJSON (file, callback) {
  loadText(file, function (err, data) {
    if (err) {
      callback(err, null)
    } else {
      var json = null
      try {
        json = JSON.parse(data)
      } catch (e) {
        return callback(e, null)
      }
      callback(null, json)
    }
  })
}
function loadJSON (file, callback) {
  loadText(file, function (err, data) {
    if (err) {
      callback(err, null)
    } else {
      var json = null
      try {
        json = JSON.parse(data)
      } catch (e) {
        return callback(e, null)
      }
      callback(null, json)
    }
  })
}
function loadJSON ( file , callback ) { loadText ( file , function ( err , data ) { if ( err ) { callback ( err , null ) } else { var json = null try { json = JSON . parse ( data ) } catch ( e ) { return callback ( e , null ) } callback ( null , json ) } } ) }
Loads JSON data
@param {String} file - url addess (Browser) or file path (Plask)
@param {Function} callback - function(err, json) { }
@param {Error} callback.err - error if any or null
@param {String} callback.json - loaded JSON data
Loads JSON data