Logo Search packages:      
Sourcecode: libjson-java version File versions

JSONObject net::sf::json::JSONArray::getJSONObject ( int  index  )  [inline]

Get the JSONObject associated with an index.

index subscript
A JSONObject value.
JSONException If there is no value for the index or if the value is not a JSONObject

Definition at line 1991 of file JSONArray.java.

      Object o = get( index );
      if( JSONNull.getInstance()
            .equals( o ) ){
         return new JSONObject( true );
      }else if( o instanceof JSONObject ){
         return (JSONObject) o;
      throw new JSONException( "JSONArray[" + index + "] is not a JSONObject." );

Generated by  Doxygen 1.6.0   Back to index