Get an optional JSONObject associated with a key. It returns null if there
is no such key, or if its value is not a JSONObject.

@param key A key string.
@return A JSONObject which is the value.
770169
public JSONObject optJSONObject( String key ) {
      verifyIsNull();
      Object o = opt( key );
      return o instanceof JSONObject ? (JSONObject) o : null;
   }
1310193
public JSONObject getObjectUseEval(String key) {
        Object object = eval(key);
        return Checker.isNull(object) ? null : (JSONObject) object;
    }
1303151
public JSONObject element( String key, int value ) {
      verifyIsNull();
      return element( key, new Integer( value ) );
   }
363154
public static boolean isNullObject(JSONObject jsonObject, String key) throws JSONException {
		checkArguments(jsonObject, key);
		JSONValue value = jsonObject.get(key);

		boolean isNull = false;
		if (value == null || value.isNull() != null) {
			isNull = true;
		}
		return isNull;
	}
242007
public V get(Object key) {
        final int index = indexOfKey(key);
        return index >= 0 ? (V)mArray[(index<<1)+1] : null;
    }
752012
public JSONObject element( String key, Map value ) {
      return element( key, value, new JsonConfig() );
   }
550447
public Object get(String key) {
    	if(config != null) {
    		return config.get(key);
    	}
    	else
    		return null;
    }
1190601
private String getJsonKey(String key) {
		String jsonKey = key;
		if (addQuoteToKey) {
			jsonKey = JavascriptStringUtil.quote(key);
		}
		return jsonKey;
	}
1302275
public String get(final String key) {
        final Collection<Argument> args = map.get(key);
        if (args != null) {
            return args.iterator().hasNext() ? args.iterator().next().getValue() : null;
        }
        return null;
    }
1210824
@Override
    public JsonNode getJsonNode(PortletPreferences prefs, String key) throws IOException {
        final String prefValue = StringUtils.trimToNull(prefs.getValue(key, null));
        if (prefValue == null) {
            // Default to an empty object
            return mapper.createObjectNode();
        }
        return mapper.readTree(prefValue);
    }
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.");
    }
1304647
@Override
    public OptionalThing<String> getParameter(String key) {
        assertArgumentNotNull("key", key);
        final String param = getRequest().getParameter(key);
        return OptionalThing.ofNullable(param != null && !param.isEmpty() ? param : null, () -> {
            throw new IllegalStateException("Not found the request parameter for the key: " + key);
        });
    }
210686
public String getString(String key) {
    Object value = get(key);
    if (value instanceof String) {
      return (String) value;
    } else if (value != null) {
      return String.valueOf(value);
    }
    return null;
  }
1348984
public Object getValue(String key) {
        if (values == null) {
            return null;
        }
        return values.get(key);
    }
734104
public JSONArray getArrayUseEval(String key) {
        Object object = eval(key);
        return Checker.isNull(object) ? null : (JSONArray) object;
    }
773074
public Json.Array getArray(String key) {
    return getArray(key, (Json.Array) null);
  }
1254957
protected static String getString(JSONObject json, String key) {

        JSONValue value = json.get(key);
        JSONString str = value.isString();
        if (str == null) {
            return null;
        }
        return str.stringValue();
    }