Parses the properties of a feature

Syntax:

"properties": {"prop0": "value0"}

@param jp
190181
private void parseProperties(JsonParser jp, Object[] values) throws IOException, SQLException {
        jp.nextToken();//START_OBJECT {
        while (jp.nextToken() != JsonToken.END_OBJECT) {
            String fieldName = TableLocation.quoteIdentifier(jp.getText().toUpperCase(), isH2); //FIELD_NAME columnName 
            JsonToken value = jp.nextToken();
            if (value == JsonToken.VALUE_STRING) {                
                values[cachedColumnIndex.get(fieldName)] =  jp.getText();
            } else if (value == JsonToken.VALUE_TRUE) {
                values[cachedColumnIndex.get(fieldName)] =  jp.getValueAsBoolean();
            } else if (value == JsonToken.VALUE_FALSE) {
                values[cachedColumnIndex.get(fieldName)] =  jp.getValueAsBoolean();
            } else if (value == JsonToken.VALUE_NUMBER_FLOAT) {
                values[cachedColumnIndex.get(fieldName)] =  jp.getValueAsDouble();
            } else if (value == JsonToken.VALUE_NUMBER_INT) {
                values[cachedColumnIndex.get(fieldName)] =  jp.getBigIntegerValue();
            } else if (value == JsonToken.START_ARRAY) {
                ArrayList<Object> arrayList = parseArray(jp);
                values[cachedColumnIndex.get(fieldName)] = arrayList.toArray();
            } else if (value == JsonToken.START_OBJECT) {
                String str = parseObject(jp);
                values[cachedColumnIndex.get(fieldName)] = str;
            } else if (value == JsonToken.VALUE_NULL) {
                values[cachedColumnIndex.get(fieldName)] = "null";
            }
            else {
                //ignore other value
            }
        }

    }
730579
private void parseProperties(Element element, BeanDefinitionBuilder builder,
                                 ManagedList<AbstractBeanDefinition> propertyList) {
        NodeList properties = element.getChildNodes();

        for (int i = 0; i < properties.getLength(); i++) {
            Node node = properties.item(i);

            if (!(node instanceof Element)) {
                continue;
            }

            Element property = (Element) node;
            BeanDefinitionBuilder propertyBuilder = BeanDefinitionBuilder.genericBeanDefinition(PropertyInfo.class);
            addProperties(property, propertyBuilder);
            parseConfig(property, propertyBuilder);
            propertyList.add(propertyBuilder.getBeanDefinition());
        }
    }
820884
private void generateProperties(JsonNode node, String parentPrefix,
			Properties props) {

		Iterator<Entry<String, JsonNode>> fields = node.fields();
		while (fields.hasNext()) {
			Entry<String, JsonNode> entry = fields.next();
			String fieldName = entry.getKey();
			JsonNode jsonNode = entry.getValue();
			String nodePrefix = parentPrefix == null ? fieldName : parentPrefix
					+ FIELD_NAME_SEPARATOR + fieldName;
			if (jsonNode.isTextual() || jsonNode.isBoolean()) {
				props.put(nodePrefix, jsonNode.asText());
			} else if (jsonNode.isNumber()) {
				props.put(nodePrefix, Integer.toString(jsonNode.asInt()));
			} else if (jsonNode.isArray()) {
				String arrayValue = convertToString(jsonNode);
				props.put(nodePrefix, arrayValue);
			}
			generateProperties(jsonNode, nodePrefix, props);
		}
	}
448501
public void parsePropertyElement(Element ele, BeanDefinition bd) {
    String propertyName = ele.getAttribute(NAME_ATTRIBUTE);
    if (!StringUtils.hasLength(propertyName)) {
      error("Tag 'property' must have a 'name' attribute", ele);
      return;
    }
    this.parseState.push(new PropertyEntry(propertyName));
    try {
      if (bd.getPropertyValues().contains(propertyName)) {
        error("Multiple 'property' definitions for property '" + propertyName + "'", ele);
        return;
      }
      Object val = parsePropertyValue(ele, bd, propertyName);
      PropertyValue pv = new PropertyValue(propertyName, val);
      parseMetaElements(ele, pv);
      pv.setSource(extractSource(ele));
      bd.getPropertyValues().addPropertyValue(pv);
    } finally {
      this.parseState.pop();
    }
  }
1067538
public static Object handleGetProperty(Object o, String prop) throws JspCoreException {
        if (o == null) {
            throw new JspCoreException("jsp.error.beans.nullbean");
        }
        Object value = null;
        try {
            Method method = getReadMethod(o.getClass(), prop);
            value = method.invoke(o, null);
        }
        catch (Exception ex) {
            throw new JspCoreException(ex);
        }
        return value;
    }
418173
protected Object getBeanPropertyValue(final String property, final Object bean) {
		if (bean == null) {
			return null;
		}

		if (".".equals(property)) {
			return bean;
		}

		try {
			Object data = PropertyUtils.getProperty(bean, property);
			return data;
		} catch (Exception e) {
			LOG.error("Failed to get bean property " + property + " on " + bean, e);
			return null;
		}
	}
1060259
private static void setFieldValue(Object entity, Attribute column, JsonElement value)
    {
        if (column.getJavaType().isAssignableFrom(byte[].class))
        {
            PropertyAccessorHelper.set(entity, (Field) column.getJavaMember(),
                    PropertyAccessorFactory.STRING.toBytes(value.getAsString()));
        }
        else
        {
            PropertyAccessorHelper.set(
                    entity,
                    (Field) column.getJavaMember(),
                    PropertyAccessorHelper.fromSourceToTargetClass(column.getJavaType(), String.class,
                            value.getAsString()));
        }
    }
1256333
public static Object getProperty(Object obj, String prop, Object defaultValue) {

	// first try field
	Field[] fields = getFieldsIgnoreCase(obj.getClass(), prop, null);
	if (!ArrayUtil.isEmpty(fields)) {
	    try {
		return fields[0].get(obj);
	    }
	    catch (Throwable t) {
		ExceptionUtil.rethrowIfNecessary(t);
	    }
	}

	// then getter
	try {
	    char first = prop.charAt(0);
	    if (first >= '0' && first <= '9') return defaultValue;
	    return getGetter(obj.getClass(), prop).invoke(obj);
	}
	catch (Throwable e1) {
	    ExceptionUtil.rethrowIfNecessary(e1);
	    return defaultValue;
	}
    }
1144997
private void parseParentGeometryMetadata(JsonParser jp) throws IOException, SQLException {
        if(jp.nextToken()!=JsonToken.VALUE_NULL){//START_OBJECT { in case of null geometry
        jp.nextToken(); // FIELD_NAME type     
        jp.nextToken(); //VALUE_STRING Point
        String geometryType = jp.getText();        
        parseGeometryMetadata(jp, geometryType);
        } 
        
    }
387104
@Override
	public void updateProperties( Dictionary<?,?> properties ) {

		// Ignore iPojo properties
		final List<String> propertiesToSkip = Arrays.asList(
				"component",
				"felix.fileinstall.filename" );

		Map<String,String> map = new HashMap<> ();
		for( Enumeration<?> en = properties.keys(); en.hasMoreElements(); ) {

			Object key = en.nextElement();
			String keyAsString = String.valueOf( key );
			if( propertiesToSkip.contains( keyAsString ))
				continue;

			// "null" are not acceptable values in dictionaries
			// (OSGi often use Hash tables)
			Object value = properties.get( key );
			map.put( keyAsString, String.valueOf( value ));
		}

		this.cache.clear();
		this.cache.putAll( map );
		this.logger.fine( "Preferences were updated in bulk mode." );
	}
886711
public static Properties parseJSON(String json) {
    try {
      return utilsImpl.parseJSON(json);
    } catch (Exception e) {
      if (!GWT.isProdMode()) {
        System.err.println("Error while parsing json: " + e.getMessage() + ".\n" + json);
      }
      return Properties.create();
    }
  }
1292751
protected void setProperty(JKLocale locale, final String propName, final String value) {
		logger.trace("Add label :", propName, " , with value: ", value);
		Properties prop = getLables(locale);
		prop.setProperty(JKCollectionUtil.fixPropertyKey(propName), fixValue(value));
	}
114149
private void parse(String propKey, String propValue) {
        if (ARG_TAG.equals(propValue)) {
            String value = System.getProperty(propKey);

            if (StringUtils.isNotBlank(value) && value.startsWith(CRYPTEX_TAG)) {
                value = decrypt(value);
            }

            if (StringUtils.isNotBlank(value)) {
                this.props.setValue(propKey, value, Application.getMode().toString());
            }
        }

        if (propValue.startsWith(CRYPTEX_TAG)) {
            this.props.setValue(propKey, decrypt(propValue), Application.getMode().toString());
        }
    }
1243560
@Override
  public IAgentConfiguration parse(Configuration agentConfiguration) throws InternalException {
    if (agentConfiguration == null) {
      return null;
    }
    AgentConfigurationImpl conf = new AgentConfigurationImpl();
    try {

      conf.properties = new Properties();
      Configuration[] propConfs = agentConfiguration.getChildren(Properties.ordinal());
      for (Configuration c : propConfs) {

        conf.properties.put(c.getStringValue(PropertyName.ordinal(), ""), c.getStringValue(PropertyValue.ordinal(), ""));
      }
    }
    catch (Exception e) {
      throw new InternalException(e);
    }
    return conf;
  }
591759
static Property parse(final String line) throws IOException {
        if (!line.startsWith("property ")) {
            throw new IOException("not a property: '"
                    + line + "'");
        }
        String definition = line.substring("property ".length());
        definition = definition.trim();

        if (!definition.startsWith("list ")) {
            throw new IllegalArgumentException("not a list property: '"
                    + line + "'");
        }
        definition = definition.substring("list ".length());
        definition = definition.trim();

        String[] parts = definition.split(" +", 3);
        if (parts.length != 3) {
            throw new IOException("Expected three parts in list property "
                    + "definition: '" + line + "'");
        }
        String countType = parts[0];
        String type = parts[1];
        String name = parts[2];

        DataType dataType;
        DataType countDataType;
        try {
            dataType = DataType.parse(type);
            countDataType = DataType.parse(countType);
        }
        catch (IllegalArgumentException e) {
            throw new IOException(e.getMessage());
        }

        return new ListProperty(countDataType, name, dataType);
    }
1012767
def _parse_properties(response, result_class):
    '''
    
    '''

    if response is None or response.headers is None:
        return None

    props = result_class()
    for key, value in response.headers.items():
        info = GET_PROPERTIES_ATTRIBUTE_MAP.get(key)
        if info:
            if info[0] is None:
                setattr(props, info[1], info[2](value))
            else:
                attr = getattr(props, info[0])
                setattr(attr, info[1], info[2](value))

    if hasattr(props, 'blob_type') and props.blob_type == 'PageBlob' and hasattr(props, 'blob_tier') and props.blob_tier is not None:
        props.blob_tier = _to_upper_str(props.blob_tier)
    return props
279681
@Override
    public Object getProperty(String propertyId)
            throws SAXNotRecognizedException {
        if ((PROPERTY + "declaration-handler").equals(propertyId)) {
            return (declHandler == base) ? null : declHandler;
        }

        if ((PROPERTY + "lexical-handler").equals(propertyId)) {
            return (lexicalHandler == base) ? null : lexicalHandler;
        }

        // unknown properties
        throw new SAXNotRecognizedException(propertyId);
    }