Returns the value mapped by {@code name} if it exists and is a {@code
JsonArray}, or null otherwise.
13904
public JsonArray optJsonArray(String name) {
        JsonElement el = null;
        try {
            el = get(name);
        } catch (JsonException e) {
            return null;
        }
        if (!el.isJsonArray()) {
            return null;
        }
        return el.asJsonArray();
    }
220555
public FieldValue get(String name) {
    if (schema == null) {
      throw new UnsupportedOperationException(
          "Retrieving field value by name is not supported when there is no fields schema provided");
    }
    return get(schema.getIndex(name));
  }
933943
public JSONArray getJSONArray(String key) throws JSONException {
    Object o = get(key);
    if (o instanceof JSONArray) {
      return (JSONArray) o;
    }
    throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONArray.");
  }
226975
public synchronized String getValue(String name) {
        if (map == null) {
            return null;
        }
        return map.get(name);
    }
518219
public static JSONArray getArray(JSONValue value) {
        if (value == null)
            return null;
        if (!(value instanceof JSONArray))
            throw new JSONException(NOT_AN_ARRAY);
        return (JSONArray)value;
    }
550158
public Object get(Map<String, Object> data, String name) {
    Object value = data.get(name);
    if (null == value) return null;
    if (value.getClass().isArray()) {
      Object[] values = (Object[]) value;
      if (values.length == 1) { return values[0]; }
    }
    return value;
  }
883856
public JsonArray names() throws JsonException {
        return nameValuePairs.isEmpty()
                ? null
                : new JsonArray(new ArrayList<String>(nameValuePairs.keySet()));
    }
227428
public String getFieldValue(String name) {
        String field = (String)fields.get(name);
        if (field == null) {
            return null;
        }
        else {
        	return field;
        }
    }
776593
public String getAttributeValue(final String name) {
        final List<Attribute> attributes = Collections.synchronizedList(getAttributes());
        for (int i = 0; i < attributes.size(); i++) {
            final Attribute a = attributes.get(i);

            if (a.getName() != null && a.getName().equals(name)) {
                return a.getValue();
            }
        }
        return null;
    }
162749
@Override
    public Object getValue(String name)
    {
        Object value = super.getValue(name);
        if (value != null)
        {
            return value;
        }
        else
        {
            return configMap.get(name);
        }
    }
833880
static javax.json.JsonValue map(final JsonValue jsonValue) {
        if (jsonValue instanceof JsonArray)
            return map((JsonArray) jsonValue);
        return map((JsonObject) jsonValue);
    }
1367776
static JsonArray getArrayFromJsonElement(JsonElement jsonElement) {
        JsonArray jsonArray = null;
        if (jsonElement.isJsonArray()) {
            jsonArray = jsonElement.getAsJsonArray();
        } else if (jsonElement.isJsonObject() &&
                ((JsonObject) jsonElement).get("results") != null &&
                ((JsonObject) jsonElement).get("results").isJsonArray()) {
            jsonArray = ((JsonObject) jsonElement).get("results").getAsJsonArray();
        }
        return jsonArray;
    }
150974
public String [] get(final String name) {
		if(has(name)) {
			List<String> values = parameters.get(name).getValues();
			Collections.sort(values);
			return values.toArray(new String [values.size()]);
		}
		else
			return null;
	}
587440
public JSONArray names() {

        JSONArray ja = new JSONArray();
        Iterator<String> keys = keys();
        while (keys.hasNext()) {
            ja.put(keys.next());
        }
        return ja.length() == 0 ? null : ja;
    }
259886
public JsonValue getPropertyValue(String name) {
        // Return a copy of json value to ensure user can't change the underlying object directly
        JsonValue jsonValue = mCacheMap.getAsJsonValue(name);
        return jsonValue == null ? null : JsonValue.readFrom(jsonValue.toString());
    }
275760
public String getString(String name) throws JSONException {
		Object object = get(name);
		String result = JSON.toString(object);
		if (result == null) {
			throw JSON.typeMismatch(name, object, "String");
		}
		return result;
	}
535560
public JsonElement get(String name) throws JsonException {
        JsonElement result = nameValuePairs.get(name);
        if (result == null) {
            throw new JsonException("No value for " + name + ", in: " + this.toString());
        }
        return result;
    }