Table of Contents

Class JDataResultExtensions

Namespace
Cuemon.Extensions.Newtonsoft.Json
Assembly
Cuemon.Extensions.Newtonsoft.Json.dll

Extension methods for the JDataResult class.

public static class JDataResultExtensions
Inheritance
Object
JDataResultExtensions

Methods

ExtractArrayValues(IEnumerable<JDataResult>, String, Action<IDictionary<String, IEnumerable<JDataResult>>>)

Extracts one or more values from JSON arrays using the specified propertyNames and extractor delegate.

public static void ExtractArrayValues(this IEnumerable<JDataResult> source, string propertyNames, Action<IDictionary<string, IEnumerable<JDataResult>>> extractor)

Parameters

source IEnumerable<JDataResult>

The sequence of JDataResult to parse.

propertyNames String

The comma-delimited property names (JSON path) to math in a JSON document.

extractor Action<IDictionary<String, IEnumerable<JDataResult>>>

The delegate that will extract values from propertyNames.

ExtractObjectValues(IEnumerable<JDataResult>, String, Action<IDictionary<String, JDataResult>>)

Extracts one or more values from JSON objects using the specified propertyNames and extractor delegate.

public static void ExtractObjectValues(this IEnumerable<JDataResult> source, string propertyNames, Action<IDictionary<string, JDataResult>> extractor)

Parameters

source IEnumerable<JDataResult>

The sequence of JDataResult to parse.

propertyNames String

The comma-delimited property names (JSON path) to math in a JSON document.

extractor Action<IDictionary<String, JDataResult>>

The delegate that will extract values from propertyNames.

Flatten(IEnumerable<JDataResult>)

Flattens the entirety of the JSON hierarchical source into an System.Collections.Generic.IEnumerable<T> sequence.

public static IEnumerable<JDataResult> Flatten(this IEnumerable<JDataResult> source)

Parameters

source IEnumerable<JDataResult>

The System.Collections.Generic.IEnumerable<T> to extend.

Returns

IEnumerable<JDataResult>

An System.Collections.Generic.IEnumerable<T> sequence of JDataResult objects.