Returns the value mapped by {@code name} if it exists and is a {@code
JsonArray}, or throws otherwise.

@throws JsonException if the mapping doesn't exist or is not a {@code
JsonArray}.
184615
public JsonArray getJsonArray(String name) throws JsonException {
        JsonElement el = get(name);
        if (!el.isJsonArray()) {
            throw Util.typeMismatch(name, el, "JsonArray");
        }
        return el.asJsonArray();
    }
267331
@Override
    public Object getMember(String name) {
        switch (name) {
            case "toJSON":
                return F_toJSON;
            case "toString":
                return F_toString;
            case "valueOf":
                return F_valueOf;
            case "getJavaObject":
                return F_getJavaObject;
        }
        return null;
//        throw new RuntimeException(getClassName() + "." + name + " is not defined");
    }
656138
@Nullable
	public static Type evaluateJavaLangType(@Nonnull final String name) {
		Check.notEmpty(name, "name");
		Type ret = null;
		for (final Type type : JAVA_LANG_VALUE_TYPES) {
			if (type.getName().equals(name.replace("java.lang.", ""))) {
				ret = type;
				break;
			}
		}
		return ret;
	}
844968
public Object get(String key) throws JSONException {
        if (key == null) {
            throw new JSONException("Null key.");
        }
        Object object = this.opt(key);
        if (object == null) {
            throw new JSONException("JSONObject[" + quote(key) + "] not found.");
        }
        return object;
    }
956255
public String getString(String key) throws JSONException {
        Object object = this.get(key);
        if (object instanceof String) {
            return (String) object;
        } else if( NULL.equals(object) ) {
            return (String) null;
        }
        throw new JSONException("JSONObject[" + quote(key) + "] not a string.");
    }
609896
public String getStringFrom(JsonValue json) {
    if (json.isString()) {
      return json.asString();
    } else {
      return json.toString();
    }
  }
543764
public int getInt(String name) throws JSONException {
		Object object = get(name);
		Integer result = JSON.toInteger(object);
		if (result == null) {
			throw JSON.typeMismatch(name, object, "int");
		}
		return result;
	}
499039
public JSONArray element( Map value, JsonConfig jsonConfig ) {
      if( value instanceof JSONObject ){
         elements.add( value );
         return this;
      }else{
         return element( JSONObject.fromObject( value, jsonConfig ) );
      }
   }
658708
@JsonProperty
  @Override
  public String getName()
  {
    String name = this.name;
    if (Strings.isNullOrEmpty(name)) {
      name = delegate.getName();
    }
    return name;
  }
851391
public T get(final String name) {
        for (final T i : this) {
            if (i.getName().equals(name)) {
                return i;
            }
        }
        return null;
    }
828409
public String getString(String name, boolean strict) throws JsonException {
        JsonElement el = get(name);
        String res = null;
        if (strict && !el.isString()) {
            throw Util.typeMismatch(name, el, "string", true);
        }
        res = el.toString();
        if (res == null)
            throw Util.typeMismatch(name, el, "string", strict);
        return res;
    }
1292218
public JSONArray names() {
      verifyIsNull();
      JSONArray ja = new JSONArray();
      Iterator keys = keys();
      while( keys.hasNext() ){
         ja.element( keys.next() );
      }
      return ja;
   }
1059507
public static JSONValue parse(String jsonString) throws JSONException {
		if (jsonString == null || "".equals(jsonString)) {
			return JSONNull.getInstance();
		}
		if (jsonString.charAt(0) == '[') {
			return new JSONArray(eval(jsonString));
		}
		return new JSONObject(eval(jsonString));
	}
620841
protected Map jsonMap() {
        checkJsonContentType();
        try {
            return JsonHelper.toMap(getRequestString());
        } catch (IOException e) {
            throw new WebException(e);
        }
    }
543819
public static Object getElement(final JsonNode json, final String name) {
        if (json != null && name != null) {
            JsonNode node = json;
            for (String nodeName : name.split("\\.")) {
                if (node != null) {
                    if (nodeName.matches("\\d+")) {
                        node = node.get(Integer.parseInt(nodeName));
                    } else {
                        node = node.get(nodeName);
                    }
                }
            }
            if (node != null) {
                if (node.isNumber()) {
                    return node.numberValue();
                } else if (node.isBoolean()) {
                    return node.booleanValue();
                } else if (node.isTextual()) {
                    return node.textValue();
                } else if (node.isNull()) {
                    return null;
                } else {
                    return node;
                }
            }
        }
        return null;
    }
1225334
public JSONStringer key(String name) throws JSONException {
		if (name == null) {
			throw new JSONException("Names must be non-null");
		}
		beforeKey();
		string(name);
		return this;
	}
317909
public JsonObject getJsonObject(String name) throws JsonException {
        JsonElement el = get(name);
        if (!el.isJsonObject()) {
            throw Util.typeMismatch(name, el, "JsonObject");
        }
        return el.asJsonObject();
    }