com.esri.arcgis.system
Interface IJSONArray

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
IJSONArray2
All Known Implementing Classes:
IJSONArray2Proxy, IJSONArrayProxy, JSONArray

public interface IJSONArray
extends java.io.Serializable

COM Interface 'IJSONArray'. Generated 3/19/2015 1:20:52 PM from 'C:\ArcGIS\COM\esriSystem.olb'

Description: 'Provides simplified DOM-like JSON serialization and de-serialization API.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =


Field Summary
static java.lang.String IID
          Deprecated. Internal use only
static int IID4abe3bc0_6d3c_4fba_9c55_c9ac7c32d9b1
           
static int xxDummy
          Deprecated. Internal use only
 
Method Summary
 void add(java.lang.Object value)
          Adds new variant value to the array.
 void addBoolean(boolean value)
          Adds new boolean value to the array.
 void addDate(java.util.Date value)
          Adds new DATE value to the array.
 void addDouble(double value)
          Adds new double value to the array.
 void addDoubleEx(double value, int precision)
          Adds new double value to the array.
 void addJSONArray(IJSONArray value)
          Adds new nested array to the array.
 void addJSONObject(IJSONObject value)
          Adds new nested object to the array.
 void addLong(int value)
          Adds new long value to the array.
 void addNull()
          Adds new null value to the array.
 void addString(java.lang.String value)
          Adds new string value to the array.
 void clearAll()
          Removes all values.
 void createMemberArray(IJSONArray[] value)
          Creates and adds new member to the member collection.
 void createMemberObject(IJSONObject[] value)
          Creates and adds new member to the member collection.
 int getCount()
          Returns an array size.
 java.lang.Object getValue(int index)
          Returns an array value at a given index.
 boolean isValueNull(int index)
          Checks if an array value at a given index is NULL.
 void parseJSON(IJSONReader pReader)
          Parses JSON array from IJSONReader into memory.
 void parseString(java.lang.String json)
          Parses JSON array from string into memory.
 void removeValue(int index)
          Remove a value from the member collection.
 void toJSON(java.lang.String objectName, IJSONWriter pWriter)
          Converts IJSONArray to JSON representation using provided IJSONWriter.
 java.lang.String toJSONString(IPropertySet props)
          Converts IJSONArray to JSON representation using IJSONWriter internally.
 boolean tryGetValueAsArray(int index, IJSONArray[] value)
          Returns array value at a given index as IJSONArray.
 boolean tryGetValueAsBoolean(int index, boolean[] value)
          Returns array value at a given index as boolean.
 boolean tryGetValueAsDate(int index, java.util.Date[] value)
          Returns array value at a given index as DATE.
 boolean tryGetValueAsDouble(int index, double[] value)
          Returns array value at a given index as double.
 boolean tryGetValueAsLong(int index, int[] value)
          Returns array value at a given index as long.
 boolean tryGetValueAsObject(int index, IJSONObject[] value)
          Returns array value at a given index as IJSONObject.
 boolean tryGetValueAsString(int index, java.lang.String[] value)
          Returns array value at a given index as string.
 

Field Detail

IID4abe3bc0_6d3c_4fba_9c55_c9ac7c32d9b1

static final int IID4abe3bc0_6d3c_4fba_9c55_c9ac7c32d9b1
See Also:
Constant Field Values

xxDummy

static final int xxDummy
Deprecated. Internal use only
See Also:
Constant Field Values

IID

static final java.lang.String IID
Deprecated. Internal use only
See Also:
Constant Field Values
Method Detail

parseString

void parseString(java.lang.String json)
                 throws java.io.IOException,
                        AutomationException
Parses JSON array from string into memory.

Parameters:
json - The json (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

parseJSON

void parseJSON(IJSONReader pReader)
               throws java.io.IOException,
                      AutomationException
Parses JSON array from IJSONReader into memory. Useful if you want to have random acces to just a part of a JSON.

Parameters:
pReader - A reference to a com.esri.arcgis.system.IJSONReader (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCount

int getCount()
             throws java.io.IOException,
                    AutomationException
Returns an array size.

Returns:
The count
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getValue

java.lang.Object getValue(int index)
                          throws java.io.IOException,
                                 AutomationException
Returns an array value at a given index. Returns E_INVALIDARG if index is out of bounds.

Parameters:
index - The index (in)
Returns:
A Variant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isValueNull

boolean isValueNull(int index)
                    throws java.io.IOException,
                           AutomationException
Checks if an array value at a given index is NULL.

Parameters:
index - The index (in)
Returns:
The value
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

tryGetValueAsDate

boolean tryGetValueAsDate(int index,
                          java.util.Date[] value)
                          throws java.io.IOException,
                                 AutomationException
Returns array value at a given index as DATE. If index is out of bounds or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
index - The index (in)
value - The value (out: use single element array)
Returns:
The success
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

tryGetValueAsBoolean

boolean tryGetValueAsBoolean(int index,
                             boolean[] value)
                             throws java.io.IOException,
                                    AutomationException
Returns array value at a given index as boolean. If index is out of bounds or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
index - The index (in)
value - The value (out: use single element array)
Returns:
The success
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

tryGetValueAsLong

boolean tryGetValueAsLong(int index,
                          int[] value)
                          throws java.io.IOException,
                                 AutomationException
Returns array value at a given index as long. If index is out of bounds or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
index - The index (in)
value - The value (out: use single element array)
Returns:
The success
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

tryGetValueAsDouble

boolean tryGetValueAsDouble(int index,
                            double[] value)
                            throws java.io.IOException,
                                   AutomationException
Returns array value at a given index as double. If index is out of bounds or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
index - The index (in)
value - The value (out: use single element array)
Returns:
The success
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

tryGetValueAsString

boolean tryGetValueAsString(int index,
                            java.lang.String[] value)
                            throws java.io.IOException,
                                   AutomationException
Returns array value at a given index as string. If index is out of bounds or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
index - The index (in)
value - The value (out: use single element array)
Returns:
The success
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

tryGetValueAsObject

boolean tryGetValueAsObject(int index,
                            IJSONObject[] value)
                            throws java.io.IOException,
                                   AutomationException
Returns array value at a given index as IJSONObject. If index is out of bounds or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
index - The index (in)
value - A reference to a com.esri.arcgis.system.IJSONObject (out: use single element array)
Returns:
The success
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

tryGetValueAsArray

boolean tryGetValueAsArray(int index,
                           IJSONArray[] value)
                           throws java.io.IOException,
                                  AutomationException
Returns array value at a given index as IJSONArray. If index is out of bounds or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
index - The index (in)
value - A reference to a com.esri.arcgis.system.IJSONArray (out: use single element array)
Returns:
The success
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

add

void add(java.lang.Object value)
         throws java.io.IOException,
                AutomationException
Adds new variant value to the array.

Parameters:
value - A Variant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addDate

void addDate(java.util.Date value)
             throws java.io.IOException,
                    AutomationException
Adds new DATE value to the array.

Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addBoolean

void addBoolean(boolean value)
                throws java.io.IOException,
                       AutomationException
Adds new boolean value to the array.

Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addLong

void addLong(int value)
             throws java.io.IOException,
                    AutomationException
Adds new long value to the array.

Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addDouble

void addDouble(double value)
               throws java.io.IOException,
                      AutomationException
Adds new double value to the array.

Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addString

void addString(java.lang.String value)
               throws java.io.IOException,
                      AutomationException
Adds new string value to the array.

Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addNull

void addNull()
             throws java.io.IOException,
                    AutomationException
Adds new null value to the array.

Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addJSONObject

void addJSONObject(IJSONObject value)
                   throws java.io.IOException,
                          AutomationException
Adds new nested object to the array.

Parameters:
value - A reference to a com.esri.arcgis.system.IJSONObject (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addJSONArray

void addJSONArray(IJSONArray value)
                  throws java.io.IOException,
                         AutomationException
Adds new nested array to the array.

Parameters:
value - A reference to a com.esri.arcgis.system.IJSONArray (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createMemberObject

void createMemberObject(IJSONObject[] value)
                        throws java.io.IOException,
                               AutomationException
Creates and adds new member to the member collection. Returns E_FAIL if creation of the member fails.

Parameters:
value - A reference to a com.esri.arcgis.system.IJSONObject (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createMemberArray

void createMemberArray(IJSONArray[] value)
                       throws java.io.IOException,
                              AutomationException
Creates and adds new member to the member collection. Returns E_FAIL if creation of the member fails.

Parameters:
value - A reference to a com.esri.arcgis.system.IJSONArray (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

toJSONString

java.lang.String toJSONString(IPropertySet props)
                              throws java.io.IOException,
                                     AutomationException
Converts IJSONArray to JSON representation using IJSONWriter internally. 'props' parameter is to control IJSONWriter properties. It's safe to set it to NULL.

Parameters:
props - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
The outStr
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

toJSON

void toJSON(java.lang.String objectName,
            IJSONWriter pWriter)
            throws java.io.IOException,
                   AutomationException
Converts IJSONArray to JSON representation using provided IJSONWriter. Useful when you have complex JSON response you want to combine from the output of several methods.

Parameters:
objectName - The objectName (in)
pWriter - A reference to a com.esri.arcgis.system.IJSONWriter (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeValue

void removeValue(int index)
                 throws java.io.IOException,
                        AutomationException
Remove a value from the member collection.

Parameters:
index - The index (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearAll

void clearAll()
              throws java.io.IOException,
                     AutomationException
Removes all values.

Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addDoubleEx

void addDoubleEx(double value,
                 int precision)
                 throws java.io.IOException,
                        AutomationException
Adds new double value to the array. Stores precision for use in ToJSON and ToJSONString

Parameters:
value - The value (in)
precision - The precision (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.