diff --git a/JSONObject.java b/JSONObject.java index 4159c0fed..92d4c20bc 100755 --- a/JSONObject.java +++ b/JSONObject.java @@ -748,7 +748,16 @@ public String getString(String key) throws JSONException { * @return true if the key exists in the JSONObject. */ public boolean has(String key) { - return this.map.containsKey(key); + if (key.indexOf(delimiter) != -1 || key.indexOf(leftBracket) != -1) { + try { + get(key); + return true; + } catch (JSONException e) { + return false; + } + } else { + return this.map.containsKey(key); + } } /**