Class
JsonObject
class JsonObject
Module: System.Data.Json
Assembly: System.Data.dll
Source file: JsonValue.rvn
Inheritance: Object → JsonValue → JsonObject
Implements: Map<String, JsonValue>
Part of closed hierarchy: JsonValue
A JSON object with ordinal field names and a read-only map view.
Remarks
Field and Find provide safe lookup. The indexer faults when a field is absent. Keys and pair iteration are shallow snapshots in insertion order; JsonNull remains an explicit present value. Mutation uses duplicate-rejecting Add.
Constructors
1 item
JsonObject()
Creates an empty container.
Properties
2 items
Count: int
Gets the current number of entries.
Implements Map<String, JsonValue>.Count
Keys: Sequence<string>
Gets a shallow snapshot of field names in insertion order.
Implements Map<String, JsonValue>.Keys
Indexers
1 item
Item[name: string]: JsonValue
Gets an existing JSON field value.
Implements Map<String, JsonValue>.Item
Methods
35 items
Add(name: string, value: JsonValue) -> Result<void, JsonError>
Adds a named child without replacing existing members.
Extension member:
All(predicate: (KeyValuePair<string, JsonValue>) -> bool) -> bool
No summary available.
Extension from Operators.All
Extension member:
Any(predicate: (KeyValuePair<string, 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<KeyValuePair<string, JsonValue>>) -> Iterable<KeyValuePair<string, JsonValue>>
Enumerates the first source followed by the second source.
Extension from Operators.Concat
ContainsKey(name: string) -> bool
Tests whether an exact ordinal field name is present.
Implements Map<String, JsonValue>.ContainsKey
Extension member:
Count(predicate: (KeyValuePair<string, 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
Field(name: string) -> Result<JsonValue, JsonError>
Finds an object member by its exact decoded name.
Extension member:
Filter(predicate: (KeyValuePair<string, JsonValue>) -> bool) -> Iterable<KeyValuePair<string, JsonValue>>
No summary available.
Extension from Operators.Filter
Find(name: string) -> Optional<JsonValue>
Finds a field, returning None when absent and Some for every present node, including JsonNull.
Implements Map<String, JsonValue>.Find
Extension member:
First(predicate: (KeyValuePair<string, JsonValue>) -> bool) -> Optional<KeyValuePair<string, JsonValue>>
No summary available.
Extension from Operators.First
Extension member:
First() -> Optional<KeyValuePair<string, JsonValue>>
Returns the first source element matching the optional predicate, or None when none exists.
Extension from Operators.First
Extension member:
FlatMap<U>(selector: (KeyValuePair<string, JsonValue>) -> Iterable<U>) -> Iterable<U>
No summary available.
Extension from Operators.FlatMap
Extension member:
Fold<U>(seed: U, accumulator: (U, KeyValuePair<string, JsonValue>) -> U) -> U
No summary available.
Extension from Operators.Fold
GetHashCode() -> int
Returns a stable identity hash by default; an ordinary class may override it consistently with equality.
Inherited from Object.GetHashCode
GetIterator() -> Iterator<KeyValuePair<string, JsonValue>>
Returns a shallow snapshot of field pairs in insertion order.
Implements Iterable<KeyValuePair<String, 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: (KeyValuePair<string, JsonValue>) -> bool) -> Optional<KeyValuePair<string, JsonValue>>
No summary available.
Extension from Operators.Last
Extension member:
Last() -> Optional<KeyValuePair<string, JsonValue>>
Returns the last source element matching the optional predicate, or None when none exists.
Extension from Operators.Last
Extension member:
Map<U>(selector: (KeyValuePair<string, JsonValue>) -> U) -> Iterable<U>
No summary available.
Extension from Operators.Map
Name(index: int) -> Result<string, JsonError>
Gets a member name in insertion order.
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: (KeyValuePair<string, JsonValue>) -> bool) -> Result<KeyValuePair<string, JsonValue>, SingleError>
No summary available.
Extension from Operators.Single
Extension member:
Single() -> Result<KeyValuePair<string, 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<KeyValuePair<string, JsonValue>>
Returns an iterable that skips the requested number of leading elements.
Extension from Operators.Skip
Extension member:
Take(count: int) -> Iterable<KeyValuePair<string, 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<KeyValuePair<string, JsonValue>>
Materializes the source into a new ArrayList in enumeration order.
Extension from Operators.ToList
Extension member:
ToMap(comparer: EqualityComparer<string>) -> HashMap<string, JsonValue>
Copies pairs into a new map using an explicit key comparer.
Extension from MapOperators.ToMap
Extension member:
ToMap<K, V>(keySelector: (KeyValuePair<string, JsonValue>) -> K, valueSelector: (KeyValuePair<string, 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