JObjectExtension.GetArrayItems method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Json.Extensions
Assembly Skybrud.Essentials.dll

GetArrayItems(JObject, string)

Static

Gets the items of the JArray from the token matching the specfied path.

public static JToken[] GetArrayItems(JObject obj, string path)

Parameters

obj JObject

The instance of JObject .

path String

A String that contains a JPath expression.

Returns

Array of JToken

An array of JToken . If the a matching token isn't found, an empty array will still be returned.

GetArrayItems<T>(JObject, string)

Static

Gets the items of the JArray from the token matching the specfied path.

public static T[] GetArrayItems<T>(JObject obj, string path)

Type Parameters

T

Parameters

obj JObject

The instance of JObject .

path String

A String that contains a JPath expression.

Returns

Array of T

An array of T. If the a matching token isn't found, an empty array will still be returned.

GetArrayItems<T>(JObject, string, Func<T, TResult>)

Static

Gets the items of the JArray from the token matching the specfied path.

public static T[] GetArrayItems<T>(JObject obj, string path, Func<T, TResult> callback)

Type Parameters

T

Parameters

obj JObject

The instance of JObject .

path String

A String that contains a JPath expression.

callback Func<T, TResult>

A callback function used for parsing or converting the token value.

Returns

Array of T

An array of T. If the a matching token isn't found, an empty array will still be returned.

GetArrayItems<T>(JObject, string, Func<T, TResult>)

Static

Gets the items of the JArray from the token matching the specfied path.

public static T[] GetArrayItems<T>(JObject obj, string path, Func<T, TResult> callback)

Type Parameters

T

Parameters

obj JObject

The instance of JObject .

path String

A String that contains a JPath expression.

callback Func<T, TResult>

A callback function used for parsing or converting the token value.

Returns

Array of T

An array of T. If the a matching token isn't found, an empty array will still be returned.

GetArrayItems<TKey,TValue>(JObject, string, Func<T, TResult>)

Static

Gets the items of the JArray from the token matching the specfied path.

public static TValue[] GetArrayItems<TKey,TValue>(JObject obj, string path, Func<T, TResult> callback)

Type Parameters

TKey
TValue

Parameters

obj JObject

The instance of JObject .

path String

A String that contains a JPath expression.

callback Func<T, TResult>

A callback function used for parsing or converting the token value.

Returns

Array of TValue

An array of TValue. If the a matching token isn't found, an empty array will still be returned.