IJSONReader Interface

Provides access to Sequential JSON Reader.

Members

Name Description
Read-only property CurrentTokenType Obtains type of current token.
Method FindProperties Reads current object until one of property names matches. Case is ignored. Return value is an index of property name that matched, otherwise -1.
Method FindProperty Reads current object until property name matches or object ends. Case is ignored.
Method IsBoolean Indicates true if current token is a property value or array value of boolean type.
Method IsEndOfArray Indicates true if current token is ']'.
Method IsEndOfObject Indicates true if current token is '}'.
Method IsNull Indicates true if current token is a property value or array value and equals to null.
Method IsNumber Indicates true if current token is a property value or array value of numeric type.
Method IsStartOfArray Indicates true if current token is '['.
Method IsStartOfObject Indicates true if current token is '{'.
Method IsString Indicates true if current token is a property value or array value of type string.
Method Read Reads next JSON token.
Method ReadFrom Specifies input stream.
Method ReadFromString Specifies input as string.
Method ReadPropertyName Obtains property name. Advances to the next token.
Method ReadValue Obtains array or property value as Variant. Advances to the next token.
Method ReadValueAsBoolean Obtains array or property value as boolean. Advances to the next token. If property value cannot be coerced to boolean, returns E_​FAIL.
Method ReadValueAsDate Obtains property or array value as date. Advances to the next token. If property value cannot be coerced to datetime, returns E_​FAIL.
Method ReadValueAsDouble Obtains property or array value as number. Advances to the next token. If property value cannot be coerced to double, returns E_​FAIL.
Method ReadValueAsLong Obtains property or array value as number. Advances to the next token. If property value cannot be coerced to long, returns E_​FAIL.
Method ReadValueAsString Obtains property or array value as string. Advances to the next token. If property value cannot be coerced to string, returns E_​FAIL.
Method SkipUntilArrayEnds Skips the rest of the current object, including closing bracket.
Method SkipUntilObjectEnds Skips the rest of the current object, including closing bracket.
Read-only property Stream Obtains underlying stream.

IJSONReader.CurrentTokenType Property

Obtains type of current token.

Public ReadOnly Property CurrentTokenType As JSONTokenType
public JSONTokenType CurrentTokenType {get;}

IJSONReader.FindProperties Method

Reads current object until one of property names matches. Case is ignored. Return value is an index of property name that matched, otherwise -1.

Public Function FindProperties ( _
    ByVal propnames As IStringArray _
) As Integer
public int FindProperties (
    IStringArray propnames
);

IJSONReader.FindProperty Method

Reads current object until property name matches or object ends. Case is ignored.

Public Function FindProperty ( _
    ByVal propname As String _
) As Boolean
public bool FindProperty (
    string propname
);

IJSONReader.IsBoolean Method

Indicates true if current token is a property value or array value of boolean type.

Public Function IsBoolean ( _
) As Boolean
public bool IsBoolean (
);

IJSONReader.IsEndOfArray Method

Indicates true if current token is ']'.

Public Function IsEndOfArray ( _
) As Boolean
public bool IsEndOfArray (
);

IJSONReader.IsEndOfObject Method

Indicates true if current token is '}'.

Public Function IsEndOfObject ( _
) As Boolean
public bool IsEndOfObject (
);

IJSONReader.IsNull Method

Indicates true if current token is a property value or array value and equals to null.

Public Function IsNull ( _
) As Boolean
public bool IsNull (
);

IJSONReader.IsNumber Method

Indicates true if current token is a property value or array value of numeric type.

Public Function IsNumber ( _
) As Boolean
public bool IsNumber (
);

IJSONReader.IsStartOfArray Method

Indicates true if current token is '['.

Public Function IsStartOfArray ( _
) As Boolean
public bool IsStartOfArray (
);

IJSONReader.IsStartOfObject Method

Indicates true if current token is '{'.

Public Function IsStartOfObject ( _
) As Boolean
public bool IsStartOfObject (
);

IJSONReader.IsString Method

Indicates true if current token is a property value or array value of type string.

Public Function IsString ( _
) As Boolean
public bool IsString (
);

IJSONReader.Read Method

Reads next JSON token.

Public Sub Read ( _
)
public void Read (
);

IJSONReader.ReadFrom Method

Specifies input stream.

Public Sub ReadFrom ( _
    ByVal inputStream As IStream _
)
public void ReadFrom (
    IStream inputStream
);

IJSONReader.ReadFromString Method

Specifies input as string.

Public Sub ReadFromString ( _
    ByVal Text As String _
)
public void ReadFromString (
    string Text
);

IJSONReader.ReadPropertyName Method

Obtains property name. Advances to the next token.

Public Function ReadPropertyName ( _
) As String
public string ReadPropertyName (
);

IJSONReader.ReadValue Method

Obtains array or property value as Variant. Advances to the next token.

Public Function ReadValue ( _
) As Object
public object ReadValue (
);

IJSONReader.ReadValueAsBoolean Method

Obtains array or property value as boolean. Advances to the next token. If property value cannot be coerced to boolean, returns E_FAIL.

Public Function ReadValueAsBoolean ( _
) As Boolean
public bool ReadValueAsBoolean (
);

IJSONReader.ReadValueAsDate Method

Obtains property or array value as date. Advances to the next token. If property value cannot be coerced to datetime, returns E_FAIL.

Public Function ReadValueAsDate ( _
) As DateTime
public DateTime ReadValueAsDate (
);

IJSONReader.ReadValueAsDouble Method

Obtains property or array value as number. Advances to the next token. If property value cannot be coerced to double, returns E_FAIL.

Public Function ReadValueAsDouble ( _
) As Double
public double ReadValueAsDouble (
);

IJSONReader.ReadValueAsLong Method

Obtains property or array value as number. Advances to the next token. If property value cannot be coerced to long, returns E_FAIL.

Public Function ReadValueAsLong ( _
) As Integer
public int ReadValueAsLong (
);

IJSONReader.ReadValueAsString Method

Obtains property or array value as string. Advances to the next token. If property value cannot be coerced to string, returns E_FAIL.

Public Function ReadValueAsString ( _
) As String
public string ReadValueAsString (
);

IJSONReader.SkipUntilArrayEnds Method

Skips the rest of the current object, including closing bracket.

Public Sub SkipUntilArrayEnds ( _
)
public void SkipUntilArrayEnds (
);

IJSONReader.SkipUntilObjectEnds Method

Skips the rest of the current object, including closing bracket.

Public Sub SkipUntilObjectEnds ( _
)
public void SkipUntilObjectEnds (
);

IJSONReader.Stream Property

Obtains underlying stream.

Public ReadOnly Property Stream As IStream
public IStream Stream {get;}

Classes that implement IJSONReader

Classes Description
JSONReader A sequential JSON Reader.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.