Load all constant symbols from constants.json
341590
private function LoadConstantsFromJson()
    {
        $constants_def = Json::Decode(
            file_get_contents($this->definitions_path . "constants.json")
        );

        foreach($constants_def as $header => $namespaces)
        {
            $this->symbols->AddHeader($header);
            
            foreach($namespaces as $namespace => $constants)
            {
                foreach($constants as $constant_name => $constant_data)
                {
                    if(!isset($constant_data["description"]))
                        $constant_data["description"] = "";
                    
                    $constant = new Element\Constant(
                        $constant_name,
                        $constant_data["value"],
                        $constant_data["description"]
                    );

                    $this->symbols->headers[$header]->AddConstant(
                        $constant,
                        $namespace
                    );
                }
            }
        }

        unset($constants_def);
    }
1279575
def load(name, base_path=None):
    """"""
    if '/' in name:
        return load_location(name, base_path, module=True)

    return importer.import_symbol(name, base_path)
1147822
function getTypingNamesFromJson(jsonPath, filesToWatch) {
                if (host.fileExists(jsonPath)) {
                    filesToWatch.push(jsonPath);
                }
                var result = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); });
                if (result.config) {
                    var jsonConfig = result.config;
                    if (jsonConfig.dependencies) {
                        mergeTypings(ts.getOwnKeys(jsonConfig.dependencies));
                    }
                    if (jsonConfig.devDependencies) {
                        mergeTypings(ts.getOwnKeys(jsonConfig.devDependencies));
                    }
                    if (jsonConfig.optionalDependencies) {
                        mergeTypings(ts.getOwnKeys(jsonConfig.optionalDependencies));
                    }
                    if (jsonConfig.peerDependencies) {
                        mergeTypings(ts.getOwnKeys(jsonConfig.peerDependencies));
                    }
                }
            }
548031
function oldJson(json, local, namePrefix){
  if (namePrefix) {
    utils.assertString(namePrefix, 'namePrefix');
    namePrefix = namePrefix.val;
  } else {
    namePrefix = '';
  }
  local = local ? local.toBoolean() : new nodes.Boolean(local);
  var scope = local.isTrue ? this.currentScope : this.global.scope;

  convert(json);
  return;

  function convert(obj, prefix){
    prefix = prefix ? prefix + '-' : '';
    for (var key in obj){
      var val = obj[key];
      var name = prefix + key;
      if ('object' == typeof val) {
        convert(val, name);
      } else {
        val = utils.coerce(val);
        if ('string' == val.nodeName) val = utils.parseString(val.string);
        scope.add({ name: namePrefix + name, val: val });
      }
    }
  }
}
344959
function formatSymbolExport(symbol, namespaces, imports) {
  const name = symbol.name;
  const parts = name.split('~');
  const isNamed = parts[0].indexOf('.') !== -1;
  const nsParts = parts[0].replace(/^module\:/, '').split(/[\/\.]/);
  const last = nsParts.length - 1;
  const importName = isNamed ?
    '_' + nsParts.slice(0, last).join('_') + '$' + nsParts[last] :
    '$' + nsParts.join('$');
  let line = nsParts[0];
  for (let i = 1, ii = nsParts.length; i < ii; ++i) {
    line += `.${nsParts[i]}`;
    namespaces[line] = (line in namespaces ? namespaces[line] : true) && i < ii - 1;
  }
  line += ` = ${importName};`;
  imports[getImport(symbol, nsParts.pop())] = true;
  return line;
}
1308343
function load () {
  const str = fs.readFileSync(settingsFile, 'utf8')
  if (str) {
    const settings = JSON.parse(str)
    this.settings = settings.livereload
    this.paths = getPaths(settings)
      .map(p => path.normalize(this.root + '/' + p))
      .map(p => makeGlob(p))
  }
}
579406
function buildLoadKey (blueprintMeta, originalKey, json) {
  const keyParts = [
    blueprintMeta.namespace,
    originalKey
  ]

  if (json.version) {
    keyParts.push(json.version.replace('.', '_'))
  }

  return keyParts.join('_')
}
1120066
def all_loaded_constants
      constants
        .map { |c| const_get(c) }
        .select { |a| a.respond_to?(:loaded?) && a.loaded? }
    end
375156
def constantize(str)
      str = str.to_s
      call_or_yield str do
        raise(NameError, "#{s.inspect} is not a valid constant name!") unless m = VALID_CONSTANT_NAME_REGEXP.match(str)
        Object.module_eval("::#{m[1]}", __FILE__, __LINE__)
      end
    end
1232731
def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None,
          parse_int=None, parse_constant=None, object_pairs_hook=None):
    """"""

    assert cls is None, 'Custom decoders are not supported'

    if sys.version_info[0] < 3:
        decodable_type = type('')
    else:
        decodable_type = type(b'')
    if isinstance(s, decodable_type):
        encoding = encoding or 'utf-8'
        s = s.decode(encoding)

    if not s:
        raise ValueError('Empty strings are not legal JSON5')
    parser = Parser(s, '<string>')
    ast, err, newpos = parser.parse()
    if err:
        raise ValueError(err)

    def _fp_constant_parser(s):
        return float(s.replace('Infinity', 'inf').replace('NaN', 'nan'))

    if object_pairs_hook:
        dictify = object_pairs_hook
    elif object_hook:
        dictify = lambda pairs: object_hook(dict(pairs))
    else:
        dictify = dict

    parse_float = parse_float or float
    parse_int = parse_int or int
    parse_constant = parse_constant or _fp_constant_parser

    return _walk_ast(ast, dictify, parse_float, parse_int, parse_constant)
142356
def load_parameters(self, source):
        """"""
        with open(source) as parameters_source:
            loaded = yaml.safe_load(parameters_source.read())
            for k, v in loaded.items():
                if isinstance(v, str):
                    loaded[k] = "'"+v+"'"
            return loaded
798432
def get(args):
    """"""
    from . import config
    for key in args.key.split("."):
        config = getattr(config, key)
    print(json.dumps(config))
880152
def load_parameters(self, source):
        """"""
        with open(source) as parameters_source:
            return json.loads(parameters_source.read())
457472
def _loadMetaFromJson(self, path):
        
        try:
            with (path / 'metadata.json').open() as infile:
                return json.load(infile)
        except FileNotFoundError:
            logger.error('Metadata does not exist at ' + str(path))
            return None
157772
def generate_const(self):
        
        const = self._definition['const']
        if isinstance(const, str):
            const = '"{}"'.format(const)
        with self.l('if {variable} != {}:', const):
            self.l('raise JsonSchemaException("{name} must be same as const definition")')
293258
function loadInfo() {
    try {
      var data = fs.readFileSync(__rootdir + '/package.json', { encoding: 'utf8' });
      var tmp = JSON.parse(data);
      appPackage = {
        name: tmp.name || null,
        version: tmp.version || 1
      }
    } catch(e) {
      return; // nothing to do.
    }
  }
1281010
def __get_constants(self):
        
        helper = ConstantClass(self._constants_class_name, self._io)
        helper.reload()
        constants = helper.constants()

        for name, value in constants.items():
            self._add_replace_pair(name, value, True)

        self._io.text('Read {0} constants for substitution from <fso>{1}</fso>'.
                      format(len(constants), helper.file_name()))