Load roller shutter from JSON.
777760
def load_roller_shutter(self, item):
        """"""
        rollershutter = RollerShutter.from_config(self.pyvlx, item)
        self.add(rollershutter)
307470
def load(self, filename):
        """"""
        content = open(filename)
        return Config(json.load(content))
995938
private JsonObject loadJson(String fileName) {
    URL url = cl.getResource(fileName);
    try {
      try (Scanner scanner = new Scanner(url.openStream(), "UTF-8").useDelimiter("\\A")) {
        String json = scanner.next();
        return new JsonObject(json);
      } catch (NoSuchElementException e) {
        throw new VertxException("Empty network configuration file.");
      } catch (DecodeException e) {
        throw new VertxException("Invalid network configuration file.");
      }
    } catch (IOException e) {
      throw new VertxException("Failed to read network configuration file.");
    }
  }
946208
def from_json_file(file: TextIO, check_version=True) -> BELGraph:
    """"""
    graph_json_dict = json.load(file)
    return from_json(graph_json_dict, check_version=check_version)
1173264
function preloadJSON(data, onload, onerror) {
            var xmlhttp = new XMLHttpRequest();

            if (xmlhttp.overrideMimeType) {
                xmlhttp.overrideMimeType("application/json");
            }

            xmlhttp.open("GET", data.src + api.nocache, true);
            xmlhttp.withCredentials = me.loader.withCredentials;

            // set the callbacks
            xmlhttp.ontimeout = onerror;
            xmlhttp.onreadystatechange = function () {
                if (xmlhttp.readyState === 4) {
                    // status = 0 when file protocol is used, or cross-domain origin,
                    // (With Chrome use "--allow-file-access-from-files --disable-web-security")
                    if ((xmlhttp.status === 200) || ((xmlhttp.status === 0) && xmlhttp.responseText)) {
                        // get the Texture Packer Atlas content
                        jsonList[data.name] = JSON.parse(xmlhttp.responseText);
                        // fire the callback
                        onload();
                    }
                    else {
                        onerror(data.name);
                    }
                }
            };
            // send the request
            xmlhttp.send();
        }
38300
def from_dict(raw_data):
        """"""
        url = None
        width = None
        height = None
        try:
            url = raw_data['url']
            width = raw_data['width']
            height = raw_data['height']
        except KeyError:
            raise ValueError('Unexpected image json structure')
        except TypeError:
            # Happens when raw_data is None, i.e. when a term has no image:
            pass
        return Image(url, width, height)
860778
function transformPreloadJSON(oFile) {
  const oJSONRaw = oFile.contents.toString('utf8')
  const sPrelaodJSON = `jQuery.sap.registerPreloadedModules(${oJSONRaw});`
  oFile.contents = new Buffer(sPrelaodJSON)
  return oFile
}
403813
def load(cls, webfinger, pypump):
        
        filename = cls.get_filename()

        if os.path.isfile(filename):
            data = open(filename).read()
            data = json.loads(data)
            store = cls(data, filename=filename)
        else:
            store = cls(filename=filename)

        store.prefix = webfinger
        return store
972584
def load(cls, fp, **kwargs):
    """"""
    json_obj = json.load(fp, **kwargs)
    return parse(cls, json_obj)
33235
def _load_json_file_or_url(self, json_path_or_url):
        '''
        '''
        try:
            if os.path.isfile(json_path_or_url):
                with open(json_path_or_url, 'r') as f:
                    result = json.load(f)
            else:
                res = requests.get(json_path_or_url)
                res.raise_for_status()
                result = res.json()

            return result

        except (ValueError,
                requests.exceptions.RequestException) as e:
            six.raise_from(DataPackageRegistryException(e), e)
432789
function _jsonLoaded(callback, err, data) {
  if (err) return callback(err);
  var parsed;
  try {
    parsed = JSON.parse(data);
  } catch(jerr) {
    return callback(jerr);
  }
  callback(null, parsed);
}
10395
def data_import(self, json_response):
        """"""
        if 'data' not in json_response:
            raise PyVLXException('no element data found: {0}'.format(
                json.dumps(json_response)))
        data = json_response['data']

        for item in data:
            if 'category' not in item:
                raise PyVLXException('no element category: {0}'.format(
                    json.dumps(item)))
            category = item['category']
            if category == 'Window opener':
                self.load_window_opener(item)
            elif category in ['Roller shutter', 'Dual Shutter']:
                self.load_roller_shutter(item)
            elif category in ['Blind']:
                self.load_blind(item)
            else:
                self.pyvlx.logger.warning(
                    'WARNING: Could not parse product: %s', category)
643198
def load(self, value):
        """"""

        if not isinstance(value, str):
            raise TypeError('Expected JSON string')

        _value = json.loads(value)
        self._validate_word(value=_value)
        self.word = _value
897781
def from_json(cls, path, fatal=True, logger=None):
        
        result = cls()
        result.load(path, fatal=fatal, logger=logger)
        return result
972063
def getJson(url):
    """"""
    site = urllib2.urlopen(url, timeout=300)
    return json.load(site)
293182
def read(self, filehandle):
        """"""
        return self.__import(json.load(filehandle, **self.kwargs))
1310033
def loadJson(self, filename):
        
        jsonConfig = {}
        if os.path.isfile(filename):
            jsonConfig = json.loads(' '.join(open(filename, 'r').readlines()))
        return jsonConfig