com.esri.arcgis.system
Interface IJSONReader

All Superinterfaces:
Serializable
All Known Implementing Classes:
JSONReader

public interface IJSONReader
extends Serializable

Provides access to Sequential JSON Reader.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 int findProperties(IStringArray propnames)
          Reads current object until one of property names matches.
 boolean findProperty(String propname)
          Reads current object until property name matches or object ends.
 int getCurrentTokenType()
          Obtains type of current token.
 IStream getStream()
          Obtains underlying stream.
 boolean isBoolean()
          Indicates true if current token is a property value or array value of boolean type.
 boolean isEndOfArray()
          Indicates true if current token is ']'.
 boolean isEndOfObject()
          Indicates true if current token is '}'.
 boolean isNull()
          Indicates true if current token is a property value or array value and equals to null.
 boolean isNumber()
          Indicates true if current token is a property value or array value of numeric type.
 boolean isStartOfArray()
          Indicates true if current token is '['.
 boolean isStartOfObject()
          Indicates true if current token is '{'.
 boolean isString()
          Indicates true if current token is a property value or array value of type string.
 void read()
          Reads next JSON token.
 void readFrom(IStream inputStream)
          Specifies input stream.
 void readFromString(String text)
          Specifies input as string.
 String readPropertyName()
          Obtains property name.
 Object readValue()
          Obtains array or property value as Variant.
 boolean readValueAsBoolean()
          Obtains array or property value as boolean.
 Date readValueAsDate()
          Obtains property or array value as date.
 double readValueAsDouble()
          Obtains property or array value as number.
 int readValueAsLong()
          Obtains property or array value as number.
 String readValueAsString()
          Obtains property or array value as string.
 void skipUntilArrayEnds()
          Skips the rest of the current object, including closing bracket.
 void skipUntilObjectEnds()
          Skips the rest of the current object, including closing bracket.
 

Method Detail

readFrom

void readFrom(IStream inputStream)
              throws IOException,
                     AutomationException
Specifies input stream.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

readFromString

void readFromString(String text)
                    throws IOException,
                           AutomationException
Specifies input as string.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

getStream

IStream getStream()
                  throws IOException,
                         AutomationException
Obtains underlying stream.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.system.IStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

read

void read()
          throws IOException,
                 AutomationException
Reads next JSON token.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

getCurrentTokenType

int getCurrentTokenType()
                        throws IOException,
                               AutomationException
Obtains type of current token.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A com.esri.arcgis.system.JSONTokenType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isStartOfObject

boolean isStartOfObject()
                        throws IOException,
                               AutomationException
Indicates true if current token is '{'.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

isEndOfObject

boolean isEndOfObject()
                      throws IOException,
                             AutomationException
Indicates true if current token is '}'.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

isStartOfArray

boolean isStartOfArray()
                       throws IOException,
                              AutomationException
Indicates true if current token is '['.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

isEndOfArray

boolean isEndOfArray()
                     throws IOException,
                            AutomationException
Indicates true if current token is ']'.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

isString

boolean isString()
                 throws IOException,
                        AutomationException
Indicates true if current token is a property value or array value of type string.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

isNumber

boolean isNumber()
                 throws IOException,
                        AutomationException
Indicates true if current token is a property value or array value of numeric type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

isBoolean

boolean isBoolean()
                  throws IOException,
                         AutomationException
Indicates true if current token is a property value or array value of boolean type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

isNull

boolean isNull()
               throws IOException,
                      AutomationException
Indicates true if current token is a property value or array value and equals to null.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

readValue

Object readValue()
                 throws IOException,
                        AutomationException
Obtains array or property value as Variant. Advances to the next token.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

readPropertyName

String readPropertyName()
                        throws IOException,
                               AutomationException
Obtains property name. Advances to the next token.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

readValueAsString

String readValueAsString()
                         throws IOException,
                                AutomationException
Obtains property or array value as string. Advances to the next token. If property value cannot be coerced to string, returns E_FAIL.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

readValueAsLong

int readValueAsLong()
                    throws IOException,
                           AutomationException
Obtains property or array value as number. Advances to the next token. If property value cannot be coerced to long, returns E_FAIL.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

readValueAsDouble

double readValueAsDouble()
                         throws IOException,
                                AutomationException
Obtains property or array value as number. Advances to the next token. If property value cannot be coerced to double, returns E_FAIL.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

readValueAsBoolean

boolean readValueAsBoolean()
                           throws IOException,
                                  AutomationException
Obtains array or property value as boolean. Advances to the next token. If property value cannot be coerced to boolean, returns E_FAIL.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

readValueAsDate

Date readValueAsDate()
                     throws IOException,
                            AutomationException
Obtains property or array value as date. Advances to the next token. If property value cannot be coerced to datetime, returns E_FAIL.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

findProperty

boolean findProperty(String propname)
                     throws IOException,
                            AutomationException
Reads current object until property name matches or object ends. Case is ignored.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
propname - The propname (in)
Returns:
The found
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findProperties

int findProperties(IStringArray propnames)
                   throws IOException,
                          AutomationException
Reads current object until one of property names matches. Case is ignored. Return value is an index of property name that matched, otherwise -1.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
propnames - A reference to a com.esri.arcgis.system.IStringArray (in)
Returns:
The index
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

skipUntilObjectEnds

void skipUntilObjectEnds()
                         throws IOException,
                                AutomationException
Skips the rest of the current object, including closing bracket.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

skipUntilArrayEnds

void skipUntilArrayEnds()
                        throws IOException,
                               AutomationException
Skips the rest of the current object, including closing bracket.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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