Class
JsonArray
class JsonArray
Module: System.Data.Json
Assembly: System.Data.dll
Source file: JsonValue.rvn
Inheritance: Object → JsonValue → JsonArray
Implements: Sequence<JsonValue>
Part of closed hierarchy: JsonValue
A JSON array with a read-only sequence view.
Remarks
Indexing faults on invalid indices; Item returns a recoverable error. Iteration captures a shallow ordered snapshot; node contents remain shared. Mutation uses Add; storage follows the runtime allocation budget.
Constructors
1 item
JsonArray()
Creates an empty container.
Properties
1 item
Count: int
Gets the current number of entries.
Implements Collection<JsonValue>.Count
Indexers
3 items
Extension member:
Item[index: Index]: JsonValue
Gets an element using a directional index. Invalid bounds fault.
Extension from SequenceAccess.Item
Item[index: int]: JsonValue
Gets the original node at a zero-based index, including JsonNull.
Implements Sequence<JsonValue>.Item
Extension member:
Item[range: Range]: JsonValue[]
Copies a range into independent storage. Invalid bounds fault.
Extension from SequenceAccess.Item
Methods
33 items
Add(value: JsonValue) -> Result<void, JsonError>
Appends a child reference.
Extension member:
All(predicate: (JsonValue) -> bool) -> bool
No summary available.
Extension from Operators.All
Extension member:
Any(predicate: (JsonValue) -> bool) -> bool
No summary available.
Extension from Operators.Any
Extension member:
Any() -> bool
Tests whether the source contains an element, or an element satisfying the supplied predicate.
Extension from Operators.Any
Extension member:
Concat(second: Iterable<JsonValue>) -> Iterable<JsonValue>
Enumerates the first source followed by the second source.
Extension from Operators.Concat
Extension member:
Count(predicate: (JsonValue) -> bool) -> int
No summary available.
Extension from Operators.Count
Extension member:
Count() -> int
Counts source elements, optionally restricted by the supplied predicate.
Extension from Operators.Count
Equals(other: object?) -> bool
Tests reference identity by default; an ordinary class may override equality.
Inherited from Object.Equals
Extension member:
Filter(predicate: (JsonValue) -> bool) -> Iterable<JsonValue>
No summary available.
Extension from Operators.Filter
Extension member:
First(predicate: (JsonValue) -> bool) -> Optional<JsonValue>
No summary available.
Extension from Operators.First
Extension member:
First() -> Optional<JsonValue>
Returns the first source element matching the optional predicate, or None when none exists.
Extension from Operators.First
Extension member:
FlatMap<U>(selector: (JsonValue) -> Iterable<U>) -> Iterable<U>
No summary available.
Extension from Operators.FlatMap
Extension member:
Fold<U>(seed: U, accumulator: (U, JsonValue) -> U) -> U
No summary available.
Extension from Operators.Fold
Extension member:
Get(index: Index) -> Optional<JsonValue>
Resolves a directional index against Count, returning None for invalid bounds.
Extension from SequenceAccess.Get
Extension member:
Get(index: int) -> Optional<JsonValue>
Returns the indexed element, or None for invalid bounds. Does not provide a concurrent snapshot.
Extension from SequenceAccess.Get
GetHashCode() -> int
Returns a stable identity hash by default; an ordinary class may override it consistently with equality.
Inherited from Object.GetHashCode
GetIterator() -> Iterator<JsonValue>
Returns a shallow snapshot iterator in element order.
Implements Iterable<JsonValue>.GetIterator
GetType() -> TypeInfo
Returns metadata for the concrete runtime type of this instance.
Inherited from Object.GetType
Item(index: int) -> Result<JsonValue, JsonError>
Gets the child at the given insertion index.
Extension member:
Last(predicate: (JsonValue) -> bool) -> Optional<JsonValue>
No summary available.
Extension from Operators.Last
Extension member:
Last() -> Optional<JsonValue>
Returns the last source element matching the optional predicate, or None when none exists.
Extension from Operators.Last
Extension member:
Map<U>(selector: (JsonValue) -> U) -> Iterable<U>
No summary available.
Extension from Operators.Map
Extension member:
OfType<U>() -> Iterable<U>
Lazily retains non-null elements compatible with the requested result type, preserving order.
Extension from Operators.OfType
Extension member:
Single(predicate: (JsonValue) -> bool) -> Result<JsonValue, SingleError>
No summary available.
Extension from Operators.Single
Extension member:
Single() -> Result<JsonValue, SingleError>
Returns the sole matching element, or SingleError.Empty or SingleError.Multiple for a cardinality mismatch.
Extension from Operators.Single
Extension member:
Skip(count: int) -> Iterable<JsonValue>
Returns an iterable that skips the requested number of leading elements.
Extension from Operators.Skip
Extension member:
Slice(range: Range) -> Result<JsonValue[], InvalidRangeError>
Copies a half-open range in enumeration order, or returns InvalidRangeError for invalid bounds. Uses one iterator and does not require constant-time indexed access. No concurrent s…
Extension from SequenceAccess.Slice
Extension member:
Take(count: int) -> Iterable<JsonValue>
Returns an iterable containing at most the requested number of leading elements.
Extension from Operators.Take
ToJsonString() -> Result<string, JsonError>
Converts this node to compact JSON text, including JSON quoting and escaping for strings.
Inherited from JsonValue.ToJsonString
ToJsonString(options: JsonSerializerOptions) -> Result<string, JsonError>
Converts this node to JSON text using the selected formatting.
Inherited from JsonValue.ToJsonString
Extension member:
ToList() -> ArrayList<JsonValue>
Materializes the source into a new ArrayList in enumeration order.
Extension from Operators.ToList
Extension member:
ToMap<K, V>(keySelector: (JsonValue) -> K, valueSelector: (JsonValue) -> V, comparer: EqualityComparer<K>) -> HashMap<K, V>
Materializes selected keys and values into a new map.
Extension from Operators.ToMap
ToString() -> string
Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override.
Inherited from Object.ToString