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

JSONArray net::sf::json::JSONArray::element ( int  index,
String  value 
) [inline]

Put or replace a String value in the JSONArray. If the index is greater than the length of the JSONArray, then null elements will be added as necessary to pad it out.
The string may be a valid JSON formatted string, in tha case, it will be trabsformed to a JSONArray, JSONObjetc or JSONNull.

Parameters:
index The subscript.
value A String value.
Returns:
this.
Exceptions:
JSONException If the index is negative or if the the value is an invalid number.

Definition at line 1629 of file JSONArray.java.

References element().

                                                       {
      return element( index, value, new JsonConfig() );
   }


Generated by  Doxygen 1.6.0   Back to index