public class JSONObject extends java.lang.Object implements com.esri.arcgis.interop.RemoteObjRef, IJSONObject, IJSONObject2, ISupportErrorInfo
Description 'Simplified JSON API coclass' 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 =
IID, IID2bbe5286_7c65_4fe4_9d51_c9f2a764dc10, xxDummy
IIDeea70515_fa6b_4dee_ab79_d7935bf3a838
IID, IIDdf0b3d60_548f_101b_8e65_08002b2bd119, xxDummy
Constructor and Description |
---|
JSONObject()
Constructs a JSONObject using ArcGIS Engine.
|
JSONObject(java.lang.Object obj)
Deprecated.
As of ArcGIS 9.2, replaced by normal Java casts.
JSONObject theJSONObject = (JSONObject) obj; |
Modifier and Type | Method and Description |
---|---|
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 |
addInt64(java.lang.String name,
long value)
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 |
addUInt64(java.lang.String name,
long 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.
|
boolean |
equals(java.lang.Object o)
Compare this object with another
|
static java.lang.String |
getClsid()
getClsid.
|
com.esri.arcgis.interop.Dispatch |
getJintegraDispatch()
Gets a reference to a com.esri.arcgis.interop.Dispatch which can be used to access the COM object that support for this
interface indicates the implementing class references.
|
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.
|
int |
hashCode()
the hashcode for this object
|
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo
|
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 |
release()
Release this COM object reference
|
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 |
tryGetValueAsInt64(java.lang.String name,
long[] value)
Returns member value for a given name as LONGLONG.
|
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.
|
boolean |
tryGetValueAsUInt64(java.lang.String name,
long[] value)
Returns member value for a given name as ULONGLONG.
|
boolean |
tryGetValueAsVariant(java.lang.String name,
int variantType,
java.lang.Object[] value)
Returns member value for a given name as a VARIANT of the requested type.
|
public JSONObject() throws java.io.IOException, java.net.UnknownHostException
java.io.IOException
- if there are interop problemsjava.net.UnknownHostException
- if there are interop problemspublic JSONObject(java.lang.Object obj) throws java.io.IOException
JSONObject theJSONObject = (JSONObject) obj;
obj
to JSONObject
.obj
- an object returned from ArcGIS Engine or Serverjava.io.IOException
- if there are interop problemspublic static java.lang.String getClsid()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
getJintegraDispatch
in interface com.esri.arcgis.interop.RemoteObjRef
public void release()
release
in interface com.esri.arcgis.interop.RemoteObjRef
public void parseString(java.lang.String json) throws java.io.IOException, AutomationException
parseString
in interface IJSONObject
json
- The json (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void parseJSON(IJSONReader pReader) throws java.io.IOException, AutomationException
parseJSON
in interface IJSONObject
pReader
- A reference to a com.esri.arcgis.system.IJSONReader (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean isCaseSensitiveNames() throws java.io.IOException, AutomationException
isCaseSensitiveNames
in interface IJSONObject
java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void setCaseSensitiveNames(boolean case_sensitive) throws java.io.IOException, AutomationException
setCaseSensitiveNames
in interface IJSONObject
case_sensitive
- The case_sensitive (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean memberExists(java.lang.String name) throws java.io.IOException, AutomationException
memberExists
in interface IJSONObject
name
- The name (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean isValueNull(java.lang.String name) throws java.io.IOException, AutomationException
isValueNull
in interface IJSONObject
name
- The name (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public int getMemberCount() throws java.io.IOException, AutomationException
getMemberCount
in interface IJSONObject
java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void getMemberAt(int index, java.lang.String[] name, java.lang.Object[] value) throws java.io.IOException, AutomationException
getMemberAt
in interface IJSONObject
index
- The index (in)name
- The name (out: use single element array)value
- A Variant (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValue(java.lang.String name, java.lang.Object[] value) throws java.io.IOException, AutomationException
tryGetValue
in interface IJSONObject
name
- The name (in)value
- A Variant (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsDate(java.lang.String name, java.util.Date[] value) throws java.io.IOException, AutomationException
tryGetValueAsDate
in interface IJSONObject
name
- The name (in)value
- The value (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsBoolean(java.lang.String name, boolean[] value) throws java.io.IOException, AutomationException
tryGetValueAsBoolean
in interface IJSONObject
name
- The name (in)value
- The value (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsLong(java.lang.String name, int[] value) throws java.io.IOException, AutomationException
tryGetValueAsLong
in interface IJSONObject
name
- The name (in)value
- The value (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsDouble(java.lang.String name, double[] value) throws java.io.IOException, AutomationException
tryGetValueAsDouble
in interface IJSONObject
name
- The name (in)value
- The value (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsString(java.lang.String name, java.lang.String[] value) throws java.io.IOException, AutomationException
tryGetValueAsString
in interface IJSONObject
name
- The name (in)value
- The value (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsObject(java.lang.String name, IJSONObject[] value) throws java.io.IOException, AutomationException
tryGetValueAsObject
in interface IJSONObject
name
- The name (in)value
- A reference to a com.esri.arcgis.system.IJSONObject (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsArray(java.lang.String name, IJSONArray[] value) throws java.io.IOException, AutomationException
tryGetValueAsArray
in interface IJSONObject
name
- The name (in)value
- A reference to a com.esri.arcgis.system.IJSONArray (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addDate(java.lang.String name, java.util.Date value) throws java.io.IOException, AutomationException
addDate
in interface IJSONObject
name
- The name (in)value
- The value (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addBoolean(java.lang.String name, boolean value) throws java.io.IOException, AutomationException
addBoolean
in interface IJSONObject
name
- The name (in)value
- The value (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addLong(java.lang.String name, int value) throws java.io.IOException, AutomationException
addLong
in interface IJSONObject
name
- The name (in)value
- The value (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addDouble(java.lang.String name, double value) throws java.io.IOException, AutomationException
addDouble
in interface IJSONObject
name
- The name (in)value
- The value (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addString(java.lang.String name, java.lang.String value) throws java.io.IOException, AutomationException
addString
in interface IJSONObject
name
- The name (in)value
- The value (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addNull(java.lang.String name) throws java.io.IOException, AutomationException
addNull
in interface IJSONObject
name
- The name (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void add(java.lang.String name, java.lang.Object value) throws java.io.IOException, AutomationException
add
in interface IJSONObject
name
- The name (in)value
- A Variant (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addJSONObject(java.lang.String name, IJSONObject value) throws java.io.IOException, AutomationException
addJSONObject
in interface IJSONObject
name
- The name (in)value
- A reference to a com.esri.arcgis.system.IJSONObject (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addJSONArray(java.lang.String name, IJSONArray value) throws java.io.IOException, AutomationException
addJSONArray
in interface IJSONObject
name
- The name (in)value
- A reference to a com.esri.arcgis.system.IJSONArray (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void createMemberObject(java.lang.String name, IJSONObject[] value) throws java.io.IOException, AutomationException
createMemberObject
in interface IJSONObject
name
- The name (in)value
- A reference to a com.esri.arcgis.system.IJSONObject (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void createMemberArray(java.lang.String name, IJSONArray[] value) throws java.io.IOException, AutomationException
createMemberArray
in interface IJSONObject
name
- The name (in)value
- A reference to a com.esri.arcgis.system.IJSONArray (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void makeValueNull(java.lang.String name) throws java.io.IOException, AutomationException
makeValueNull
in interface IJSONObject
name
- The name (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public java.lang.String toJSONString(IPropertySet props) throws java.io.IOException, AutomationException
toJSONString
in interface IJSONObject
props
- A reference to a com.esri.arcgis.system.IPropertySet (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void toJSON(java.lang.String objectName, IJSONWriter pWriter) throws java.io.IOException, AutomationException
toJSON
in interface IJSONObject
objectName
- The objectName (in)pWriter
- A reference to a com.esri.arcgis.system.IJSONWriter (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void removeMember(java.lang.String name) throws java.io.IOException, AutomationException
removeMember
in interface IJSONObject
name
- The name (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void clearAll() throws java.io.IOException, AutomationException
clearAll
in interface IJSONObject
java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addDoubleEx(java.lang.String name, double value, int precision) throws java.io.IOException, AutomationException
addDoubleEx
in interface IJSONObject
name
- The name (in)value
- The value (in)precision
- The precision (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addInt64(java.lang.String name, long value) throws java.io.IOException, AutomationException
addInt64
in interface IJSONObject2
name
- The name (in)value
- Signed 64-bit int (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void addUInt64(java.lang.String name, long value) throws java.io.IOException, AutomationException
addUInt64
in interface IJSONObject2
name
- The name (in)value
- Unsigned 64-bit int (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsInt64(java.lang.String name, long[] value) throws java.io.IOException, AutomationException
tryGetValueAsInt64
in interface IJSONObject2
name
- The name (in)value
- Signed 64-bit int (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsUInt64(java.lang.String name, long[] value) throws java.io.IOException, AutomationException
tryGetValueAsUInt64
in interface IJSONObject2
name
- The name (in)value
- Unsigned 64-bit int (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsVariant(java.lang.String name, int variantType, java.lang.Object[] value) throws java.io.IOException, AutomationException
tryGetValueAsVariant
in interface IJSONObject2
name
- The name (in)variantType
- The variantType (in)value
- A Variant (out: use single element array)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws java.io.IOException, AutomationException
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.