parse manifest at path, return JSON object
189723
def manifest_parse(self, path):
        ''''''
        print("fw: parsing manifests")
        content = open(path).read()
        return json.loads(content)
1367929
def _parse_manifest(self):
        
        with open(self.manifest_file, 'r') as f:
            for line in f:
                if line.startswith("Version"):
                    self.mver, self.relnum = self._parse_version(line)
                lineitems = line.split('  ')
                if len(lineitems) == 2:
                    asset_url = self._get_url(lineitems[1][:-1])
                    yield grequests.get(asset_url, stream=True)
330484
function (srcDirectory) {
  let manifest
  let manifestContent

  try {
    manifestContent = fs.readFileSync(path.join(srcDirectory, 'manifest.json'))
  } catch (readError) {
    console.warn(`Reading ${path.join(srcDirectory, 'manifest.json')} failed.`)
    console.warn(readError.stack || readError)
    throw readError
  }

  try {
    manifest = JSON.parse(manifestContent)
  } catch (parseError) {
    console.warn(`Parsing ${path.join(srcDirectory, 'manifest.json')} failed.`)
    console.warn(parseError.stack || parseError)
    throw parseError
  }

  if (!manifestNameMap[manifest.name]) {
    const extensionId = generateExtensionIdFromName(manifest.name)
    manifestMap[extensionId] = manifestNameMap[manifest.name] = manifest
    Object.assign(manifest, {
      srcDirectory: srcDirectory,
      extensionId: extensionId,
      // We can not use 'file://' directly because all resources in the extension
      // will be treated as relative to the root in Chrome.
      startPage: url.format({
        protocol: 'chrome-extension',
        slashes: true,
        hostname: extensionId,
        pathname: manifest.devtools_page
      })
    })
    return manifest
  } else if (manifest && manifest.name) {
    console.warn(`Attempted to load extension "${manifest.name}" that has already been loaded.`)
    return manifest
  }
}
1022609
function read_config(path) {
	debug.assert(path).is('string');
	return FS.exists(path).then(function read_file(exists) {
		if(!exists) {
			return {};
		}
		return FS.readFile(path, {'encoding':'utf8'}).then(function parse_json(data) {
			debug.assert(data).is('string');
			return JSON.parse(data);
		});
	}).then(function init_config(config) {
		debug.assert(config).is('object');

		if(config.applications === undefined) {
			config.applications = {};
		}

		return config;
	});
}
1261872
function(done) {
                var source = __dirname + '/manifest.json';
                var dest = self.dir + '/manifest.json';

                fs.readFile(source, function(err, manifest) {
                    if (err) return done(err);

                    manifest = JSON.parse(manifest);
                    manifest.permissions.push.apply(manifest.permissions, settings.permissions);

                    fs.writeFile(dest, JSON.stringify(manifest, null, '\t'), done);
                });
            }
648533
def load_json(self, path):
        """"""
        with open(self.profile_path(path, must_exist=True),
                  encoding='utf-8') as f:
            data = json.load(f)
        return data
1159154
def getmap(self, path, query=None):
        
        code, data, ctype = self.get(path, query)
        if ctype != 'application/json':
            self.log.error("Expecting JSON from GET of '%s', got '%s'", self.lastpath, ctype)
            raise HttpError(code=400, content_type='text/plain', content='Remote returned invalid content type: '+ctype)
        try:
            result = json.loads(data)
        except Exception as e:                                                                  # pragma: no cover
            self.log.error("Could not load JSON content from GET %r -- %s", self.lastpath, e)
            raise HttpError(code=400, content_type='text/plain', content='Could not load JSON content')
        return result
340373
function getJSON(filepath) {
  const jsonString = "g = " + fs.readFileSync(filepath, 'utf8') + "; g";
  return (new vm.Script(jsonString)).runInNewContext();
}
194384
def parse_json(path):
    # type: (str) -> List[FunctionInfo]
    
    with open(path) as f:
        data = json.load(f)  # type: List[RawEntry]
    result = []

    def assert_type(value, typ):
        # type: (object, type) -> None
        assert isinstance(value, typ), '%s: Unexpected type %r' % (path, type(value).__name__)

    def assert_dict_item(dictionary, key, typ):
        # type: (Mapping[Any, Any], str, type) -> None
        assert key in dictionary, '%s: Missing dictionary key %r' % (path, key)
        value = dictionary[key]
        assert isinstance(value, typ), '%s: Unexpected type %r for key %r' % (
            path, type(value).__name__, key)

    assert_type(data, list)
    for item in data:
        assert_type(item, dict)
        assert_dict_item(item, 'path', Text)
        assert_dict_item(item, 'line', int)
        assert_dict_item(item, 'func_name', Text)
        assert_dict_item(item, 'type_comments', list)
        for comment in item['type_comments']:
            assert_type(comment, Text)
        assert_type(item['samples'], int)
        info = FunctionInfo(encode(item['path']),
                            item['line'],
                            encode(item['func_name']),
                            [encode(comment) for comment in item['type_comments']],
                            item['samples'])
        result.append(info)
    return result
485260
async function parse(apkPath, target = `${os.tmpdir()}/apktoolDecodes`) {
  const cmd = `java -jar ${apktoolPath} d ${apkPath} -f -o ${target}`
  await shell(cmd)
  const MainfestFilePath = `${target}/AndroidManifest.xml`
  const doc = await parseManifest(MainfestFilePath)
  return parseDoc(doc)
}
796427
def parse_manifest(self, manifest_xml):
        

        manifest = dict()
        try:
            mdata = xmltodict.parse(manifest_xml)['modules']['module']
            for module in mdata:
                mod = dict()
                mod['type'] = module['@type']
                mod['name'] = module['name']
                mod['arch'] = module['arch']
                mod['checksum'] = module['checksum']
                mod['version'] = module['version']
                mod['packager'] = module['packager']
                mod['location'] = module['location']['@href']
                mod['signature'] = module['signature']['@href']
                mod['platform'] = module['platform']
                manifest[mod['version']] = mod

        except Exception as e:
            raise

        return manifest
1203961
def parse_path(path):
    """"""
    version, project = path[1:].split('/')
    return dict(version=int(version), project=project)
158923
def jsonobjlen(self, name, path=Path.rootPath()):
        
        return self.execute_command('JSON.OBJLEN', name, str_path(path))
225911
def read_local_manifest(self):
        

        manifest = file_or_default(self.get_full_file_path(self.manifest_file), {
            'format_version' : 2,
            'root'           : '/',
            'have_revision'  : 'root',
            'files'          : {}}, json.loads)

        if 'format_version' not in manifest or manifest['format_version'] < 2:
            raise SystemExit('Please update the client manifest format')
        return manifest
661397
def load_json(path: str, encoding: str = "utf-8") -> HistogramBase:
    """"""
    with open(path, "r", encoding=encoding) as f:
        text = f.read()
        return parse_json(text)
969756
function(buildPath, manifest) {
    fs.stat(manifest, function(err, stat) {
        if (! err) {
            manifest = JSON.parse(fs.readFileSync(manifest));

            for (var key in manifest) {
                del.sync(buildPath + '/' + manifest[key], { force: true });
            }
        }
    });
}
168347
def load_manifest(self, path):
        
        manifest_path = os.path.join(path, "plugin.json")
        self._logger.debug("Attempting to load plugin manifest from {}.".format(manifest_path))
        try:
            with open(manifest_path) as f:
                manifest = json.load(f)
            manifest["path"] = path
            self._manifests.append(manifest)
            self._logger.debug("Loaded plugin manifest from {}.".format(manifest_path))
        except ValueError:
            self._logger.error("Failed to decode plugin manifest at {}.".format(manifest_path))
        except (OSError, IOError) as e:
            self._logger.error("Failed to load plugin manifest at {}.".format(manifest_path))