Loads the JSON file.
555487
private function load()
    {
        $decoder = new JsonDecoder();
        $decoder->setObjectDecoding(JsonDecoder::ASSOC_ARRAY);

        $this->json = file_exists($this->path)
            ? $decoder->decodeFile($this->path)
            : array();
    }
786048
def load_file(file_name)
      File.open(file_name, "r") do |f|
        f.each_line.collect do |line|
          parse_json(line)
        end
      end
    end
307470
def load(self, filename):
        """"""
        content = open(filename)
        return Config(json.load(content))
1310734
def load_config(json_path):
  """"""
  with open(json_path, 'r') as json_file:
    config = json.loads(json_file.read())
  # sanity-test the config:
  assert(config['tree'][0]['page'] == 'index')
  return config
597852
public function loadCacheDetails()
    {
        $cacheFile = md5($this->url);
        $this->fileName = $this->saveFolder . $cacheFile;
        $this->fileJson = $this->fileName . ".json";
        if (is_readable($this->fileJson)) {
            $this->cache = json_decode(file_get_contents($this->fileJson), true);
        }
    }
111966
def load(*args, **kwargs):
    
    kwargs.update(dict(object_hook=json_numpy_obj_hook))
    return _json.load(*args, **kwargs)
203545
protected function load()
    {
        $json = file_get_contents($this->filename);
        if (false === $json) {
            // @codeCoverageIgnoreStart
            throw new RuntimeException('Unable to open file ' . $this->filename);
            // @codeCoverageIgnoreEnd
        }

        $this->unserialize($json);
        $this->cookies = $this->cookies ?: array();
    }
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
792575
def loadcache(json_file):
    
    f = open(json_file, 'r')
    data = f.read()
    f.close()
    try:
        apicache = json.loads(data)
    except ValueError as e:
        print("Error processing json:", json_file, e)
        return {}
    return apicache
776186
def loadModel(self, model_file):
        """"""
        with open(model_file) as f:
            self.q_table = json.load(f)
1135109
def load(self, name, location='local'):
        """"""
        path = self._get_path(name, location, file_ext='.json')
        if op.exists(path):
            return _load_json(path)
        path = self._get_path(name, location, file_ext='.pkl')
        if op.exists(path):
            return _load_pickle(path)
        logger.debug("The file `%s` doesn't exist.", path)
        return {}
998575
def load(self):
        """"""

        with open(self.store_file_path, 'r') as fh:
            self.store = json.loads(fh.read())
1344145
def loads(cls, str):
        
        d = json.loads(str)
        return cls.create(d)
272435
def load_json(path):
    
    try:
        with open(path, 'r') as json_file:
            return json.load(json_file)
    except (OSError, IOError):
        raise ClientException("File not found: {}".format(path))
518968
def _loadfilepath(self, filepath, **kwargs):
        
        with open(filepath, "r") as f:
            data = json.load(f, **kwargs)
        return data
1062927
def read_json_file(cls, path):
        
        with open(path, 'r') as f:
            return cls.from_dict(json.load(f))
492146
def setup(self, filepath):
        
        self.log.debug("Loading JSON-file (%s)", filepath)
        self.load_json(filepath)