com.esri.arcgis.system
Interface IJSONObject

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
IJSONObject2
All Known Implementing Classes:
IJSONObject2Proxy, IJSONObjectProxy, JSONObject

public interface IJSONObject
extends java.io.Serializable

COM Interface 'IJSONObject'. 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 IIDeea70515_fa6b_4dee_ab79_d7935bf3a838
           
static int xxDummy
          Deprecated. Internal use only
 
Method Summary
 void add(java.lang.String name, java.lang.Object value)
          Adds new member name-value pair to the member collection.
 void addBoolean(java.lang.String name, boolean value)
          Adds new member name-value pair to the member collection.
 void addDate(java.lang.String name, java.util.Date value)
          Adds new member name-value pair to the member collection.
 void addDouble(java.lang.String name, double value)
          Adds new member name-value pair to the member collection.
 void addDoubleEx(java.lang.String name, double value, int precision)
          Adds new member name-value pair to the member collection.
 void addJSONArray(java.lang.String name, IJSONArray value)
          Adds new member name-value pair to the member collection.
 void addJSONObject(java.lang.String name, IJSONObject value)
          Adds new member name-value pair to the member collection.
 void addLong(java.lang.String name, int value)
          Adds new member name-value pair to the member collection.
 void addNull(java.lang.String name)
          Adds new member with the value of null to the member collection.
 void addString(java.lang.String name, java.lang.String value)
          Adds new member name-value pair to the member collection.
 void clearAll()
          Removes all members.
 void createMemberArray(java.lang.String name, IJSONArray[] value)
          Creates and adds new member name-value pair to the member collection.
 void createMemberObject(java.lang.String name, IJSONObject[] value)
          Creates and adds new member name-value pair to the member collection.
 void getMemberAt(int index, java.lang.String[] name, java.lang.Object[] value)
          Returns member name and value at a given index.
 int getMemberCount()
          Returns size of member collection.
 boolean isCaseSensitiveNames()
          Returns true if member name lookups are case-sensitive.
 boolean isValueNull(java.lang.String name)
          Returns VARIANT_TRUE if member is undefined or member's value is null.
 void makeValueNull(java.lang.String name)
          Make a designated member NULL.
 boolean memberExists(java.lang.String name)
          Checks if a member with the given name exists.
 void parseJSON(IJSONReader pReader)
          Parses JSON object from IJSONReader into memory.
 void parseString(java.lang.String json)
          Parses JSON object from string into memory.
 void removeMember(java.lang.String name)
          Remove a member from the member collection.
 void setCaseSensitiveNames(boolean case_sensitive)
          Returns true if member name lookups are case-sensitive.
 void toJSON(java.lang.String objectName, IJSONWriter pWriter)
          Converts IJSONObject to JSON representation using provided IJSONWriter.
 java.lang.String toJSONString(IPropertySet props)
          Converts IJSONObject to JSON representation using IJSONWriter internally.
 boolean tryGetValue(java.lang.String name, java.lang.Object[] value)
          Returns member value for a given name.
 boolean tryGetValueAsArray(java.lang.String name, IJSONArray[] value)
          Returns member value for a given name as IJSONArray.
 boolean tryGetValueAsBoolean(java.lang.String name, boolean[] value)
          Returns member value for a given name as boolean.
 boolean tryGetValueAsDate(java.lang.String name, java.util.Date[] value)
          Returns member value for a given name as DATE.
 boolean tryGetValueAsDouble(java.lang.String name, double[] value)
          Returns member value for a given name as double.
 boolean tryGetValueAsLong(java.lang.String name, int[] value)
          Returns member value for a given name as long.
 boolean tryGetValueAsObject(java.lang.String name, IJSONObject[] value)
          Returns member value for a given name as IJSONObject.
 boolean tryGetValueAsString(java.lang.String name, java.lang.String[] value)
          Returns member value for a given name as string.
 

Field Detail

IIDeea70515_fa6b_4dee_ab79_d7935bf3a838

static final int IIDeea70515_fa6b_4dee_ab79_d7935bf3a838
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 object 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 object from IJSONReader into memory. Useful if you want to have random access 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.

isCaseSensitiveNames

boolean isCaseSensitiveNames()
                             throws java.io.IOException,
                                    AutomationException
Returns true if member name lookups are case-sensitive. Default value is true. Methods affected by this state change: MemberExists, IsValueNull and all TryGet... methods.

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

setCaseSensitiveNames

void setCaseSensitiveNames(boolean case_sensitive)
                           throws java.io.IOException,
                                  AutomationException
Returns true if member name lookups are case-sensitive. Default value is true. Methods affected by this state change: MemberExists, IsValueNull and all TryGet... methods.

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

memberExists

boolean memberExists(java.lang.String name)
                     throws java.io.IOException,
                            AutomationException
Checks if a member with the given name exists.

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

isValueNull

boolean isValueNull(java.lang.String name)
                    throws java.io.IOException,
                           AutomationException
Returns VARIANT_TRUE if member is undefined or member's value is null. Returns VARIANT_FALSE if member exists and its value is not null.

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

getMemberCount

int getMemberCount()
                   throws java.io.IOException,
                          AutomationException
Returns size of member collection.

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

getMemberAt

void getMemberAt(int index,
                 java.lang.String[] name,
                 java.lang.Object[] value)
                 throws java.io.IOException,
                        AutomationException
Returns member name and value at a given index.

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

tryGetValue

boolean tryGetValue(java.lang.String name,
                    java.lang.Object[] value)
                    throws java.io.IOException,
                           AutomationException
Returns member value for a given name. If member does not exist, returns VARIANT_FALSE in 'success' parameter.

Parameters:
name - The name (in)
value - A Variant (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.

tryGetValueAsDate

boolean tryGetValueAsDate(java.lang.String name,
                          java.util.Date[] value)
                          throws java.io.IOException,
                                 AutomationException
Returns member value for a given name as DATE. If member does not exist or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
name - The name (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(java.lang.String name,
                             boolean[] value)
                             throws java.io.IOException,
                                    AutomationException
Returns member value for a given name as boolean. If member does not exist or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
name - The name (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(java.lang.String name,
                          int[] value)
                          throws java.io.IOException,
                                 AutomationException
Returns member value for a given name as long. If member does not exist or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
name - The name (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(java.lang.String name,
                            double[] value)
                            throws java.io.IOException,
                                   AutomationException
Returns member value for a given name as double. If member does not exist or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
name - The name (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(java.lang.String name,
                            java.lang.String[] value)
                            throws java.io.IOException,
                                   AutomationException
Returns member value for a given name as string. If member does not exist or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
name - The name (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(java.lang.String name,
                            IJSONObject[] value)
                            throws java.io.IOException,
                                   AutomationException
Returns member value for a given name as IJSONObject. If member does not exist or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
name - The name (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(java.lang.String name,
                           IJSONArray[] value)
                           throws java.io.IOException,
                                  AutomationException
Returns member value for a given name as IJSONArray. If member does not exist or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Parameters:
name - The name (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.

addDate

void addDate(java.lang.String name,
             java.util.Date value)
             throws java.io.IOException,
                    AutomationException
Adds new member name-value pair to the member collection. Returns E_FAIL if duplicate member is found.

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

addBoolean

void addBoolean(java.lang.String name,
                boolean value)
                throws java.io.IOException,
                       AutomationException
Adds new member name-value pair to the member collection. Returns E_FAIL if duplicate member is found.

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

addLong

void addLong(java.lang.String name,
             int value)
             throws java.io.IOException,
                    AutomationException
Adds new member name-value pair to the member collection. Returns E_FAIL if duplicate member is found.

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

addDouble

void addDouble(java.lang.String name,
               double value)
               throws java.io.IOException,
                      AutomationException
Adds new member name-value pair to the member collection. Returns E_FAIL if duplicate member is found.

Parameters:
name - The name (in)
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 name,
               java.lang.String value)
               throws java.io.IOException,
                      AutomationException
Adds new member name-value pair to the member collection. Returns E_FAIL if duplicate member is found.

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

addNull

void addNull(java.lang.String name)
             throws java.io.IOException,
                    AutomationException
Adds new member with the value of null to the member collection. Returns E_FAIL if duplicate member is found.

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

add

void add(java.lang.String name,
         java.lang.Object value)
         throws java.io.IOException,
                AutomationException
Adds new member name-value pair to the member collection. Returns E_FAIL if duplicate member is found.

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

addJSONObject

void addJSONObject(java.lang.String name,
                   IJSONObject value)
                   throws java.io.IOException,
                          AutomationException
Adds new member name-value pair to the member collection. Returns E_FAIL if duplicate member is found.

Parameters:
name - The name (in)
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(java.lang.String name,
                  IJSONArray value)
                  throws java.io.IOException,
                         AutomationException
Adds new member name-value pair to the member collection. Returns E_FAIL if duplicate member is found.

Parameters:
name - The name (in)
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(java.lang.String name,
                        IJSONObject[] value)
                        throws java.io.IOException,
                               AutomationException
Creates and adds new member name-value pair to the member collection. Returns E_FAIL if duplicate member is found.

Parameters:
name - The name (in)
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(java.lang.String name,
                       IJSONArray[] value)
                       throws java.io.IOException,
                              AutomationException
Creates and adds new member name-value pair to the member collection. Returns E_FAIL if duplicate member is found.

Parameters:
name - The name (in)
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.

makeValueNull

void makeValueNull(java.lang.String name)
                   throws java.io.IOException,
                          AutomationException
Make a designated member NULL.

Parameters:
name - The name (in)
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 IJSONObject 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 IJSONObject 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.

removeMember

void removeMember(java.lang.String name)
                  throws java.io.IOException,
                         AutomationException
Remove a member from the member collection.

Parameters:
name - The name (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 members.

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

addDoubleEx

void addDoubleEx(java.lang.String name,
                 double value,
                 int precision)
                 throws java.io.IOException,
                        AutomationException
Adds new member name-value pair to the member collection. Stores precision for use in ToJSON and ToJSONString. Returns E_FAIL if duplicate member is found.

Parameters:
name - The name (in)
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.