Show / Hide Table of Contents

Class JsonArray

Represents a collection of JSON values.

Inheritance
System.Object
System.Collections.Generic.List<JsonValue>
JsonArray
Implements
System.Collections.Generic.IList<JsonValue>
System.Collections.Generic.ICollection<JsonValue>
System.Collections.Generic.IReadOnlyList<JsonValue>
System.Collections.Generic.IReadOnlyCollection<JsonValue>
System.Collections.Generic.IEnumerable<JsonValue>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
Inherited Members
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IList.get_Item(System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.Generic.List<Manatee.Json.JsonValue>.AsReadOnly()
System.Collections.Generic.List<Manatee.Json.JsonValue>.BinarySearch(Manatee.Json.JsonValue)
System.Collections.Generic.List<Manatee.Json.JsonValue>.BinarySearch(Manatee.Json.JsonValue, System.Collections.Generic.IComparer<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.BinarySearch(System.Int32, System.Int32, Manatee.Json.JsonValue, System.Collections.Generic.IComparer<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.Clear()
System.Collections.Generic.List<Manatee.Json.JsonValue>.Contains(Manatee.Json.JsonValue)
System.Collections.Generic.List<Manatee.Json.JsonValue>.ConvertAll<TOutput>(System.Converter<Manatee.Json.JsonValue, TOutput>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.CopyTo(Manatee.Json.JsonValue[])
System.Collections.Generic.List<Manatee.Json.JsonValue>.CopyTo(Manatee.Json.JsonValue[], System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.CopyTo(System.Int32, Manatee.Json.JsonValue[], System.Int32, System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.Exists(System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.Find(System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.FindAll(System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.FindIndex(System.Int32, System.Int32, System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.FindIndex(System.Int32, System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.FindIndex(System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.FindLast(System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.FindLastIndex(System.Int32, System.Int32, System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.FindLastIndex(System.Int32, System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.FindLastIndex(System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.ForEach(System.Action<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.GetEnumerator()
System.Collections.Generic.List<Manatee.Json.JsonValue>.GetRange(System.Int32, System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.IndexOf(Manatee.Json.JsonValue)
System.Collections.Generic.List<Manatee.Json.JsonValue>.IndexOf(Manatee.Json.JsonValue, System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.IndexOf(Manatee.Json.JsonValue, System.Int32, System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.Insert(System.Int32, Manatee.Json.JsonValue)
System.Collections.Generic.List<Manatee.Json.JsonValue>.InsertRange(System.Int32, System.Collections.Generic.IEnumerable<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.LastIndexOf(Manatee.Json.JsonValue)
System.Collections.Generic.List<Manatee.Json.JsonValue>.LastIndexOf(Manatee.Json.JsonValue, System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.LastIndexOf(Manatee.Json.JsonValue, System.Int32, System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.Remove(Manatee.Json.JsonValue)
System.Collections.Generic.List<Manatee.Json.JsonValue>.RemoveAll(System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.RemoveAt(System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.RemoveRange(System.Int32, System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.Reverse()
System.Collections.Generic.List<Manatee.Json.JsonValue>.Reverse(System.Int32, System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.Sort()
System.Collections.Generic.List<Manatee.Json.JsonValue>.Sort(System.Collections.Generic.IComparer<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.Sort(System.Comparison<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.Sort(System.Int32, System.Int32, System.Collections.Generic.IComparer<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.Generic.IEnumerable<Manatee.Json.JsonValue>.GetEnumerator()
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IList.Add(System.Object)
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IList.Contains(System.Object)
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IList.IndexOf(System.Object)
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IList.Remove(System.Object)
System.Collections.Generic.List<Manatee.Json.JsonValue>.ToArray()
System.Collections.Generic.List<Manatee.Json.JsonValue>.TrimExcess()
System.Collections.Generic.List<Manatee.Json.JsonValue>.TrueForAll(System.Predicate<Manatee.Json.JsonValue>)
System.Collections.Generic.List<Manatee.Json.JsonValue>.Capacity
System.Collections.Generic.List<Manatee.Json.JsonValue>.Count
System.Collections.Generic.List<Manatee.Json.JsonValue>.Item[System.Int32]
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.Generic.ICollection<Manatee.Json.JsonValue>.IsReadOnly
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.ICollection.IsSynchronized
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.ICollection.SyncRoot
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IList.IsFixedSize
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IList.IsReadOnly
System.Collections.Generic.List<Manatee.Json.JsonValue>.System.Collections.IList.Item[System.Int32]
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Manatee.Json
Assembly: Manatee.Json.dll
Syntax
public class JsonArray : List<JsonValue>, IList<JsonValue>, ICollection<JsonValue>, IReadOnlyList<JsonValue>, IReadOnlyCollection<JsonValue>, IEnumerable<JsonValue>, IList, ICollection, IEnumerable
Remarks

A value can consist of a string, a numeric value, a boolean (true or false), a null placeholder, a JSON array of values, or a nested JSON object.

Constructors

| Improve this Doc View Source

JsonArray()

Creates an empty instance of a JSON array.

Declaration
public JsonArray()
| Improve this Doc View Source

JsonArray(IEnumerable<JsonValue>)

Creates an instance of a JSON array and initializes it with the supplied JSON values.

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

A collection of JsonValues.

Properties

| Improve this Doc View Source

EqualityStandard

Defines how this JsonArray evaluates equality.

Declaration
public ArrayEquality EqualityStandard { get; set; }
Property Value
Type Description
ArrayEquality

Methods

| Improve this Doc View Source

Add(JsonValue)

Adds an object to the end of the JsonArray.

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

The object to be added to the end of the JsonArray. If the value is null, it will be replaced by Null.

| Improve this Doc View Source

AddRange(IEnumerable<JsonValue>)

Adds the elements of the specified collection to the end of the JsonArray.

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

The collection whose elements should be added to the end of the JsonArray. The collection itself cannot be null, but it can contain elements that are null. These elements will be replaced by Null

Exceptions
Type Condition
System.ArgumentNullException

collection is null.

| Improve this Doc View Source

Equals(Nullable<Object>)

Determines whether the specified System.Object is equal to the current System.Object.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj

The System.Object to compare with the current System.Object.

Returns
Type Description
System.Boolean

true if the specified System.Object is equal to the current System.Object; otherwise, false.

| Improve this Doc View Source

GetHashCode()

Serves as a hash function for a particular type.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for the current System.Object.

Overrides
System.Object.GetHashCode()
| Improve this Doc View Source

GetIndentedString(Int32)

Creates a string representation of the JSON data.

Declaration
public string GetIndentedString(int indentLevel = 0)
Parameters
Type Name Description
System.Int32 indentLevel

The indention level for the array.

Returns
Type Description
System.String

A string.

| Improve this Doc View Source

ToString()

Creates a string representation of the JSON data.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string.

Overrides
System.Object.ToString()
Remarks

Passing the returned string back into the parser will result in a copy of this Json array.

Implements

System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable

Extension Methods

LinqExtensions.ToJson(IEnumerable<JsonValue>)
LinqExtensions.ToJson<T>(IEnumerable<T>, JsonSerializer)
LinqExtensions.FromJson<T>(IEnumerable<JsonValue>, JsonSerializer)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX