• API Overview
  • EBICS API
  • FinTS API
  • XS2A API
  • SEPA API
Search Results for

    Class JsonArray

    A JSON array containing JsonValues.

    Inheritance
    System.Object
    JsonValue
    JsonArray
    JsonApiErrorObjects
    JsonApiResourceObjects
    Implements
    System.ICloneable
    System.Collections.Generic.IEnumerable<JsonValue>
    System.Collections.ICollection
    System.Collections.IEnumerable
    Inherited Members
    JsonValue.Null
    JsonValue.Undefined
    JsonValue.JsonType
    JsonValue.Item[String]
    JsonValue.Item[Int32]
    JsonValue.ValueAsString
    JsonValue.ValueAsNumber
    JsonValue.ValueAsBoolean
    JsonValue.Load(TextReader)
    JsonValue.Load(Stream)
    JsonValue.Load(String)
    JsonValue.Save(TextWriter)
    JsonValue.Save(Stream)
    JsonValue.Save(String)
    JsonValue.ToByteArray()
    JsonValue.ToString()
    JsonValue.Clone()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Subsembly.Json
    Assembly: Subsembly.Json.dll
    Syntax
    public class JsonArray : JsonValue, ICloneable, IEnumerable<JsonValue>, ICollection, IEnumerable

    Constructors

    JsonArray()

    Creates a new, mutable JsonArray.

    Declaration
    public JsonArray()

    JsonArray(IList<JsonValue>)

    Creates a new JsonArray using a given collection.

    Declaration
    public JsonArray(IList<JsonValue> aValue)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<JsonValue> aValue

    Collection of values. This must not be null. If this collection is read-only then methods like Add(JsonValue) will not work.

    JsonArray(String[])

    Creates a new JsonArray initialized with the given string array.

    Declaration
    public JsonArray(string[] vsValues)
    Parameters
    Type Name Description
    System.String[] vsValues

    Array of strings that will be added to the newly created array.

    Properties

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    Value

    Declaration
    public IList<JsonValue> Value { get; }
    Property Value
    Type Description
    System.Collections.Generic.IList<JsonValue>

    Methods

    Add(JsonValue)

    Add another JSON data element to the end of this array.

    Declaration
    public void Add(JsonValue aValue)
    Parameters
    Type Name Description
    JsonValue aValue

    AddRange(IEnumerable<JsonValue>)

    Declaration
    public void AddRange(IEnumerable<JsonValue> vJsonValues)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<JsonValue> vJsonValues

    OnAfterParseArray()

    This is called by the JSON parser after this array object was fully parsed. It can be used as a hook to validate the data, or to prepare a cache.

    Declaration
    protected virtual void OnAfterParseArray()
    Remarks

    The default implementation does nothing.

    OnCreateChildArray(Int32)

    This is called whenever the JSON parser needs a child array object for this object.

    Declaration
    protected virtual JsonArray OnCreateChildArray(int nIndex)
    Parameters
    Type Name Description
    System.Int32 nIndex

    The index position at which a child array object is needed.

    Returns
    Type Description
    JsonArray
    Remarks

    An override can use this as an opportunity to returned a more specific object, derived from JsonArray. Such a derived object could provide additional convenient properties for accessing the fields of it.

    The default implementation just returns a new JsonArray.

    OnCreateChildObject(Int32)

    This is called whenever the JSON parser needs a child object for this array.

    Declaration
    protected virtual JsonObject OnCreateChildObject(int nIndex)
    Parameters
    Type Name Description
    System.Int32 nIndex

    The index position at which a child object is needed.

    Returns
    Type Description
    JsonObject
    Remarks

    An override can use this as an opportunity to returned a more specific object, derived from JsonObject. Such a derived object could provide additional convenient properties for accessing the fields of it.

    The default implementation just returns a new JsonObject.

    Parse(Byte[])

    Declaration
    public static JsonArray Parse(byte[] vbJson)
    Parameters
    Type Name Description
    System.Byte[] vbJson
    Returns
    Type Description
    JsonArray

    Parse(String)

    Declaration
    public static JsonArray Parse(string sJson)
    Parameters
    Type Name Description
    System.String sJson
    Returns
    Type Description
    JsonArray

    ParseJson(Byte[])

    Parse the given vbJson data, adding all its objects and values to this array.

    Declaration
    public void ParseJson(byte[] vbJson)
    Parameters
    Type Name Description
    System.Byte[] vbJson

    The JSON to be parsed. If this is is null, then this method does nothing.

    ParseJson(String)

    Parse the given sJson string, adding all its objects and values to this array.

    Declaration
    public void ParseJson(string sJson)
    Parameters
    Type Name Description
    System.String sJson

    The JSON to be parsed. If this is is null or an empty string, then this method does nothing.

    Remarks

    This JsonArray will receive all the parsed object. The object will be added to this array.

    ToArray<T>()

    Declaration
    public T[] ToArray<T>()
        where T : JsonValue
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    ToStringArray()

    Declaration
    public string[] ToStringArray()
    Returns
    Type Description
    System.String[]

    Explicit Interface Implementations

    IEnumerable<JsonValue>.GetEnumerator()

    Declaration
    IEnumerator<JsonValue> IEnumerable<JsonValue>.GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<JsonValue>

    ICollection.CopyTo(Array, Int32)

    Declaration
    void ICollection.CopyTo(Array v, int i)
    Parameters
    Type Name Description
    System.Array v
    System.Int32 i

    ICollection.IsSynchronized

    Declaration
    bool ICollection.IsSynchronized { get; }
    Returns
    Type Description
    System.Boolean

    ICollection.SyncRoot

    Declaration
    object ICollection.SyncRoot { get; }
    Returns
    Type Description
    System.Object

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Implements

    System.ICloneable
    System.Collections.Generic.IEnumerable<T>
    System.Collections.ICollection
    System.Collections.IEnumerable
    In This Article
    Back to top Copyright 2009-2025 Subsembly GmbH