IJSONArray2 Interface

Provides simplified DOM-like JSON serialization and de-serialization API.

Members

Name Description
Method Add Adds new variant value to the array.
Method AddBoolean Adds new boolean value to the array.
Method AddDate Adds new DATE value to the array.
Method AddDouble Adds new double value to the array.
Method AddDoubleEx Adds new double value to the array. Stores precision for use in ToJSON and ToJSONString
Method AddInt64 Adds new variant value to the array.
Method AddJSONArray Adds new nested array to the array.
Method AddJSONObject Adds new nested object to the array.
Method AddLong Adds new long value to the array.
Method AddNull Adds new null value to the array.
Method AddString Adds new string value to the array.
Method AddUInt64 Adds new variant value to the array.
Method ClearAll Removes all values.
Read-only property Count Returns an array size.
Method CreateMemberArray Creates and adds new member to the member collection. Returns E_​FAIL if creation of the member fails.
Method CreateMemberObject Creates and adds new member to the member collection. Returns E_​FAIL if creation of the member fails.
Method IsValueNull Checks if an array value at a given index is NULL.
Method ParseJSON Parses JSON array from IJSONReader into memory. Useful if you want to have random acces to just a part of a JSON.
Method ParseString Parses JSON array from string into memory.
Method RemoveValue Remove a value from the member collection.
Method ToJSON 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.
Method ToJSONString Converts IJSONArray to JSON representation using IJSONWriter internally. 'props' parameter is to control IJSONWriter properties. It's safe to set it to NULL.
Method TryGetValueAsArray 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.
Method TryGetValueAsBoolean 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.
Method TryGetValueAsDate 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.
Method TryGetValueAsDouble 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.
Method TryGetValueAsInt64 Returns array value at a given index as LONGLONG. If index is out of bounds or type coercion fails, returns VARIANT_​FALSE in 'success' parameter.
Method TryGetValueAsLong 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.
Method TryGetValueAsObject 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.
Method TryGetValueAsString 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.
Method TryGetValueAsUInt64 Returns array value at a given index as ULONGLONG. If index is out of bounds or type coercion fails, returns VARIANT_​FALSE in 'success' parameter.
Method TryGetValueAsVariant Returns array value at a given index as a VARIANT of the requested type. If index is out of bounds or type coercion fails, returns VARIANT_​FALSE in 'success' parameter.
Read-only property Value Returns an array value at a given index. Returns E_​INVALIDARG if index is out of bounds.

IJSONArray2.AddInt64 Method

Adds new variant value to the array.

Public Sub AddInt64 ( _
    ByVal Value As Long _
)
public void AddInt64 (
    long Value
);

IJSONArray2.AddUInt64 Method

Adds new variant value to the array.

Public Sub AddUInt64 ( _
    ByVal Value As Long _
)
public void AddUInt64 (
    ulong Value
);

IJSONArray2.TryGetValueAsInt64 Method

Returns array value at a given index as LONGLONG. If index is out of bounds or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Public Function TryGetValueAsInt64 ( _
    ByVal Index As Integer, _
    ByRef Value As Int64& _
) As Boolean
public bool TryGetValueAsInt64 (
    int Index,
    ref Int64& Value
);

IJSONArray2.TryGetValueAsUInt64 Method

Returns array value at a given index as ULONGLONG. If index is out of bounds or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Public Function TryGetValueAsUInt64 ( _
    ByVal Index As Integer, _
    ByRef Value As UInt64& _
) As Boolean
public bool TryGetValueAsUInt64 (
    int Index,
    ref UInt64& Value
);

IJSONArray2.TryGetValueAsVariant Method

Returns array value at a given index as a VARIANT of the requested type. If index is out of bounds or type coercion fails, returns VARIANT_FALSE in 'success' parameter.

Public Function TryGetValueAsVariant ( _
    ByVal Index As Integer, _
    ByVal variantType As Integer, _
    ByRef Value As Object _
) As Boolean
public bool TryGetValueAsVariant (
    int Index,
    int variantType,
    ref object Value
);

Inherited Interfaces

Interfaces Description
IJSONArray Provides simplified DOM-like JSON serialization and de-serialization API.

Classes that implement IJSONArray2

Classes Description
JSONArray Simplified JSON API coclass

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