code: public JSONObject getJSONObject( String key ) {
        verifyIsNull();
        Object o = get( key );
        if( JSONNull.getInstance()
              .equals( o ) ){
           return new JSONObject( true );
        }else if( o instanceof JSONObject ){
           return (JSONObject) o;
        }
        throw new JSONException( "JSONObject[" + JSONUtils.quote( key ) + "] is not a JSONObject." );
     }
docs: Get the JSONObject value associated with a key.
  
  @param key A key string.
  @return A JSONObject which is the value.
  @throws JSONException if the key is not found or if the value is not a
  JSONObject.