return configuration in a json object that stores properties set by each *InfoFlags class
541909
def getConf(self):
        
        conf = {
            "articleInfo": self.articleInfo._getFlags().copy(),
            "eventInfo": self.eventInfo._getFlags().copy(),
            "sourceInfo": self.sourceInfo._getFlags().copy(),
            "categoryInfo":  self.categoryInfo._getFlags().copy(),
            "conceptInfo": self.conceptInfo._getFlags().copy(),
            "locationInfo": self.locationInfo._getFlags().copy(),
            "storyInfo": self.storyInfo._getFlags().copy(),
            "conceptClassInfo": self.articleInfo._getFlags().copy(),
            "conceptFolderInfo": self.articleInfo._getFlags().copy()
        }
        conf["articleInfo"].update(self.articleInfo._getVals())
        conf["eventInfo"].update(self.eventInfo._getVals())
        conf["sourceInfo"].update(self.sourceInfo._getVals())
        conf["categoryInfo"].update(self.categoryInfo._getVals())
        conf["conceptInfo"].update(self.conceptInfo._getVals())
        conf["locationInfo"].update(self.locationInfo._getVals())
        conf["storyInfo"].update(self.storyInfo._getVals())
        conf["conceptClassInfo"].update(self.conceptClassInfo._getVals())
        conf["conceptFolderInfo"].update(self.conceptFolderInfo._getVals())
        return conf
441589
private Properties getElementProperties(Map<String, Object> configProps, String elementName, String... attrKeys) {
        Properties properties = new Properties();
        for (String attrKey : attrKeys) {
            String value = (String) configProps.get(attrKey);
            if (value != null && value.length() > 0) {
                value = (String) getValue(value);
                properties.put(attrKey, value);
            }
        }

        if (properties.isEmpty() || properties.size() != attrKeys.length) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                //TODO: NLS warning msg
                Tr.debug(tc, "The authFilter element " + elementName + " specified in the server.xml file is missing one or more of these attributes "
                             + printAttrKeys(attrKeys));
            }
            return null;
        } else
            return properties;
    }
407811
def get_all_config(self):
        ''''''
        return json.dumps(self.config, indent=4, sort_keys=True, separators=(',', ':'))
705348
function addJSONProperties(jsonData, propertiesGroups, filePath, currentNamesPath) {

        var i,
            group,
            propertyDefinition,
            propertyDefinitionWithoutObjectName,
            propertyName,
            data;

        if (currentNamesPath === undefined) {
            currentNamesPath = '';
        }

        // get all values
        for (i in jsonData) {

            // add to group if is a simply object
            if (jsonData[i] instanceof Array || jsonData[i] == null || typeof jsonData[i] !== 'object' || grunt.util._.isEmpty(jsonData[i])) {

                // find group
                propertyDefinition = (currentNamesPath ? currentNamesPath + '.' + i : i)
                    .replace(/^[^.]+\./, '');
                group = propertiesUtils.getGroup(propertyDefinition, propertiesGroups);

                if (!group) {
                    grunt.log.error('Object ' + propertyDefinition + ' without init file');
                    return;
                }

                grunt.verbose.ok(propertyDefinition);

                // generate property data
                propertyDefinitionWithoutObjectName = propertyDefinition
                    .replace(group.pattern, '')
                    .replace(/^\./, '');
                propertyName = propertyDefinitionWithoutObjectName
                    .replace(/^prototype\./i, '');

                data = {
                    name:     propertyName,
                    comment:  '',

                    type:     'object',
                    isPublic: propertiesUtils.isPublic(propertyName),
                    isFromPrototype: propertiesUtils.isFromPrototype(propertyDefinitionWithoutObjectName),
                    filePath: filePath
                };


                // string -> "string"
                // true   -> true
                switch (typeof jsonData[i]) {
                case 'object':
                    if (jsonData[i] != null) {
                        data.source = JSON.stringify(jsonData[i]);
                    }
                    break;
                case 'string':
                    data.source = '"' + jsonData[i].split('"').join('\\"') + '"';
                    break;
                }
                if (data.source === undefined) {
                    data.source = '' + jsonData[i];
                }

                // add property data to prototype or inline array
                group[(data.isFromPrototype ? 'prototypeProperties' : 'inlineProperties')].push(data);
            } else {
                // is object
                // add attributeName to path and try to add
                addJSONProperties(jsonData[i], propertiesGroups, filePath, currentNamesPath ? currentNamesPath + '.' + i : i);
            }
        }
    }
1147756
def _dict_contents(self, use_dict=None, as_class=dict):
        """"""
        if _debug: Object._debug("dict_contents use_dict=%r as_class=%r", use_dict, as_class)

        # make/extend the dictionary of content
        if use_dict is None:
            use_dict = as_class()

        klasses = list(self.__class__.__mro__)
        klasses.reverse()

        # build a list of property identifiers "bottom up"
        property_names = []
        properties_seen = set()
        for c in klasses:
            for prop in getattr(c, 'properties', []):
                if prop.identifier not in properties_seen:
                    property_names.append(prop.identifier)
                    properties_seen.add(prop.identifier)

        # extract the values
        for property_name in property_names:
            # get the value
            property_value = self._properties.get(property_name).ReadProperty(self)
            if property_value is None:
                continue

            # if the value has a way to convert it to a dict, use it
            if hasattr(property_value, "dict_contents"):
                property_value = property_value.dict_contents(as_class=as_class)

            # save the value
            use_dict.__setitem__(property_name, property_value)

        # return what we built/updated
        return use_dict
22774
def get_mapping(self, meta_fields=True):
        '''
        
        '''
        return {'properties': dict((name, field.json()) for name, field in iteritems(self.fields) if meta_fields or name not in AbstractField.meta_fields)}
827306
def _get_mapping_from_secret_type_to_class_name():
    """"""
    mapping = {}
    for key, value in globals().items():
        try:
            if issubclass(value, BasePlugin) and value != BasePlugin:
                mapping[value.secret_type] = key
        except TypeError:
            pass

    return mapping
255720
def all_properties(self):
        """"""

        properties = {}
        r = self.requests.get(self.index_url + "/_mapping", headers=HEADER_JSON, verify=False)
        try:
            r.raise_for_status()
            r_json = r.json()

            if 'items' not in r_json[self.index]['mappings']:
                return properties

            if 'properties' not in r_json[self.index]['mappings']['items']:
                return properties

            properties = r_json[self.index]['mappings']['items']['properties']
        except requests.exceptions.HTTPError as ex:
            logger.error("Error all attributes for %s.", self.anonymize_url(self.index_url))
            logger.error(ex)
            return

        return properties
663088
def json_dict_copy(json_object, property_list, defaultValue=None):
    
    ret = {}
    for prop in property_list:
        p_name = prop["name"]
        for alias in prop.get("alternateName", []):
            if json_object.get(alias) is not None:
                ret[p_name] = json_object.get(alias)
                break
        if not p_name in ret:
            if p_name in json_object:
                ret[p_name] = json_object[p_name]
            elif defaultValue is not None:
                ret[p_name] = defaultValue

    return ret
17344
def _fromJSON(cls, jsonobject):
        
        newInstance = cls(jsonobject[0], jsonobject[1])
        attribDict = {}
        attribDict['dataProcessingRef'] = jsonobject[2]
        attribDict['precursor'] = jsonobject[3]
        attribDict['product'] = jsonobject[4]
        attribDict['params'] = [tuple(param) for param in jsonobject[5]]
        attribDict['attrib'] = jsonobject[6]
        attribDict['arrayInfo'] = dict()
        for arrayType, jsonEntry in viewitems(jsonobject[7]):
            arrayEntry = {'dataProcessingRef': jsonEntry['dataProcessingRef'],
                          'params': [tuple(_) for _ in jsonEntry['params']]
                          }
            attribDict['arrayInfo'][arrayType] = arrayEntry
        for key, value in viewitems(attribDict):
            setattr(newInstance, key, value)
        return newInstance
1257804
@SuppressWarnings("unchecked")
    public Dictionary<String, String> getConfigurationProperties(Dictionary<String, String> dictionary, boolean returnCopy)
    {
        if (returnCopy)
            dictionary = putAll(dictionary, null);
        if (dictionary == null)
            dictionary = new Hashtable<String, String>();
        try {
            String servicePid = this.getServicePid();
            if (servicePid != null)
            {
                ServiceReference caRef = context.getServiceReference(ConfigurationAdmin.class.getName());
                if (caRef != null)
                {
                    ConfigurationAdmin configAdmin = (ConfigurationAdmin)context.getService(caRef);
                    Configuration config = configAdmin.getConfiguration(servicePid);

                    Dictionary<String, String> configProperties = config.getProperties();
                    dictionary = putAll(configProperties, dictionary);
                }
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return dictionary;
    }
568255
function determinePropertiesToGet (type) {
  const defaultProperties = ['description', 'summary']
  let result = defaultProperties
  switch (type) {
    case 'API':
      result.push('tags', 'info')
      break
    case 'METHOD':
      result.push('tags')
      break
  }
  return result

}
425460
def _default_json_default(obj):
    
    if isinstance(obj, (datetime.datetime, datetime.date, datetime.time)):
        return obj.isoformat()
    else:
        return str(obj)
579836
function readFromLocalConfig(parent){
    return readFile(config_file(parent), "utf8")
        .then(function(contents){
            return JSON.parse(contents);
        })
        .catch(function(){
            return {
                data: {},
                installed: [],
            };
        });
}
1252489
private static JsonObject getJsonObject(Set<Attribute> columns, Object object)
    {
        JsonObject jsonObject = new JsonObject();
        for (Attribute column : columns)
        {
            if (!column.isAssociation())
            {
                Object valueObject = PropertyAccessorHelper.getObject(object, (Field) column.getJavaMember());
                jsonObject.add(((AbstractAttribute) column).getJPAColumnName(),
                        getJsonPrimitive(valueObject, column.getJavaType()));
            }
        }
        return jsonObject;
    }
1006572
def from_dict(cls, d):
        
        conf = {}
        for k in d["config"]:
            v = d["config"][k]
            if isinstance(v, dict):
                if u"type" in v:
                    typestr = v[u"type"]
                else:
                    typestr = v["type"]
                conf[str(k)] = classes.get_dict_handler(typestr)(v)
            else:
                conf[str(k)] = v
        return classes.get_class(d["class"])(name=d["name"], config=conf)
1348785
private JSONObject getConfiguration() throws JSONException {
    JSONObject configuration = new JSONObject();

    configuration.put("port", config.getPort());
    configuration.put("register", true);

    if (config.getProxy() != null) {
      configuration.put("proxy", config.getProxy());
    } else {
      configuration.put("proxy", "org.openqa.grid.selenium.proxy.DefaultRemoteProxy");
    }
    configuration.put("role", "node");
    configuration.put("registerCycle", config.getRegisterCycle());
    if (config.getMaxSession() == 0) {
      configuration.put("maxSession", driver.getSupportedDevices().length());
    } else {
      configuration.put("maxSession", config.getMaxSession());
    }
    configuration.put("browserTimeout", config.getSessionTimeoutMillis() / 1000);
    configuration.put("cleanupCycle", config.getCleanupCycle());
    configuration.put("timeout", config.getTimeout());
    configuration.put("nodePolling", config.getNodePolling());
    configuration.put("unregisterIfStillDownAfter", config.getUnregisterIfStillDownAfter());
    configuration.put("downPollingLimit", config.getDownPollingLimit());
    configuration.put("nodeStatusCheckTimeout", config.getNodeStatusCheckTimeout());

    // adding hub details
    configuration.put("hubHost", hub.getHost());
    configuration.put("hubPort", hub.getPort());

    // adding driver details
    configuration.put("seleniumProtocol", "WebDriver");
    configuration.put("host", config.getServerHost());
    configuration.put("remoteHost", "http://" + config.getServerHost() + ":" + config.getPort());
    return configuration;
  }