Loads in the requested file name, grabs the content and sets the json object
486515
public function load($fname)
    {
        $this->fname = $fname;
        if (file_exists($this->fname)) {
            $contents = file_get_contents($this->fname);
            $this->data = json_decode($contents);
        } else {
            $this->data = json_decode("[]");
        }

        $data =& $this->data;
        return $data;
    }
1103016
def set_from_file(file_name):
    
    if type(file_name) != str:
        raise TypeError('file_name must be str')
    global _config_file_name
    _config_file_name = file_name
    # Try to open the file and get the json data into a dictionary
    with open(file_name, "r") as file:
        data = yaml.load(file)
    # each value found will overwrite the same value in the config
    _list_merge(data, _config)
812278
def load_install_json(self, filename=None):
        
        if filename is None:
            filename = 'install.json'

        file_fqpn = os.path.join(self.app_path, filename)
        install_json = None
        if os.path.isfile(file_fqpn):
            try:
                with open(file_fqpn, 'r') as fh:
                    install_json = json.load(fh)
            except ValueError as e:
                self.handle_error('Failed to load "{}" file ({}).'.format(file_fqpn, e))
        else:
            self.handle_error('File "{}" could not be found.'.format(file_fqpn))
        return install_json
1003998
def load_data(self, filename):
        
        with zopen(filename, "rt") as f:
            self._data = json.load(f, cls=MontyDecoder)
182387
def load_json(self):
        
        try:
            self.request.arguments = json.loads(self.request.body)
        except ValueError:
            msg = "Could not decode JSON: %s" % self.request.body
            self.logger.debug(msg)
            self.raise_error(400, msg)
381349
def load(filepath=None, filecontent=None):
    
    conf = DotDict()

    assert filepath or filecontent
    if not filecontent:
        with io.FileIO(filepath) as handle:
            filecontent = handle.read().decode('utf-8')
    configs = json.loads(filecontent)
    conf.update(configs.items())
    return conf
1056733
def readConfigFromJSON(self, fileName):
        
        self.__logger.debug("readConfigFromJSON: reading from " + fileName)
        with open(fileName) as data_file:
            data = load(data_file)
        self.readConfig(data)
785353
def load(self, filename):
        """"""
        f = open(filename, "rb")
        d = pickle.load(f)
        f.close()
        self.__dict__.update(d)
357161
def _load_json(self, filename):
        """"""
        with open(filename, 'r') as file_handle:
            self._sensors.update(json.load(
                file_handle, cls=MySensorsJSONDecoder))
173664
def load_json(filename):
    """"""
    try:
        if PY2:
            args = 'rb'
        else:
            args = 'r'
        with open(filename, args) as fid:
            data = json.load(fid)
        return data, None
    except Exception as err:
        return None, str(err)
1344773
function loadJSON (path, callback) {
  var xobj = new XMLHttpRequest();
  xobj.overrideMimeType('application/json');
  xobj.open('GET', path, true);
  xobj.onreadystatechange = function () {
    if (xobj.readyState === 4 && xobj.status === 200) {
      callback(xobj.responseText);
    }
  };
  xobj.send(null);
}
729741
def load_json_from_file(file_path):
    """"""
    try:
        with open(file_path) as f:
            json_data = json.load(f)
    except ValueError as e:
        raise ValueError('Given file {} is not a valid JSON file: {}'.format(file_path, e))
    else:
        return json_data
686824
def load(self, filename, replace = False):
		'''  '''

		import os, json, re
		if os.path.exists(filename):
			f = open(filename, 'r')
			content = f.read()
			content = re.sub('[\t ]*?[#].*?\n', '', content)
			try:
				settings = json.loads(content)
			except ValueError:
				# This means that the configuration file is not a valid JSON document
				from lltk.exceptions import ConfigurationError
				raise ConfigurationError('\'' + filename + '\' is not a valid JSON document.')
			f.close()
			if replace:
				self.settings = settings
			else:
				self.settings.update(settings)
		else:
			lltkfilename = self.settings['module-path'] + '/' + self.settings['lltk-config-path'] + filename
			if os.path.exists(lltkfilename):
				# This means that filename was provided relative to the lltk module path
				return self.load(lltkfilename)
			from lltk.exceptions import ConfigurationError
			raise ConfigurationError('\'' + filename + '\' seems to be non-existent.')
1277100
public function load()
    {
        if (! file_exists($file = $this->getFileName())) {
            return collect();
        }

        return collect(json_decode(file_get_contents($file), true));
    }
866955
function load()
    {
        $content = trim(file_get_contents($this->file));
        $this->data = explode("\n",$content);
    }
787547
def load_file(self, filename):
        """"""
        with open(filename, 'r') as sourcefile:
            self.set_string(sourcefile.read())
479552
def load(self, ladderName):
        """"""
        self.name = ladderName # preset value to load self.filename
        with open(self.filename, "rb") as f:
            data = f.read()
            self.__dict__.update( json.loads(data) )