<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />

JArray

Represents a JSON array.
public bool IsReadOnly { get; }

Gets a value indicating whether the JArray is read-only.

public JToken this[int index] { get; set; }

Gets or sets the JToken at the specified index.

public JArray()

Initializes a new instance of the JArray class.

public JArray(JArray other)

Initializes a new instance of the JArray class from another JArray object.

public JArray(object[] content)

Initializes a new instance of the JArray class with the specified content.

public JArray(object content)

Initializes a new instance of the JArray class with the specified content.

public static JArray FromObject(object o)

Creates a JArray from an object.

public static JArray FromObject(object o, JsonSerializer jsonSerializer)

Creates a JArray from an object.

public static JArray Load(JsonReader reader)

Loads an JArray from a JsonReader.

public static JArray Load(JsonReader reader, JsonLoadSettings settings)

Loads an JArray from a JsonReader.

public static Task<JArray> LoadAsync(JsonReader reader, CancellationToken cancellationToken = default)

Asynchronously loads a JArray from a JsonReader.

public static Task<JArray> LoadAsync(JsonReader reader, JsonLoadSettings settings, CancellationToken cancellationToken = default)

Asynchronously loads a JArray from a JsonReader.

public static JArray Parse(string json)

Load a JArray from a string that contains JSON.

public static JArray Parse(string json, JsonLoadSettings settings)

Load a JArray from a string that contains JSON.

public void Add(JToken item)

Adds an item to the JArray.

public void Clear()

Removes all items from the JArray.

public bool Contains(JToken item)

Determines whether the JArray contains a specific value.

public void CopyTo(JToken[] array, int arrayIndex)

Copies the elements of the JArray to an array, starting at a particular array index.

Returns an enumerator that iterates through the collection.

public int IndexOf(JToken item)

Determines the index of a specific item in the JArray.

public void Insert(int index, JToken item)

Inserts an item to the JArray at the specified index.

public bool Remove(JToken item)

Removes the first occurrence of a specific object from the JArray.

public void RemoveAt(int index)

Removes the JArray item at the specified index.