Extensions Class
Namespace: Stimulsoft.Base.Json.Linq
Contains the LINQ to JSON extension methods.
Methods
| Method | Returns | Description |
|---|---|---|
Ancestors static |
IJEnumerable<JToken> | Returns a collection of tokens that contains the ancestors of every token in the source collection. |
AncestorsAndSelf static |
IJEnumerable<JToken> | Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. |
AsJEnumerable static (+1 overloads) |
IJEnumerable<JToken> | Returns the input typed as IJEnumerable{T}. |
Children static (+1 overloads) |
IJEnumerable<JToken> | Returns a collection of child tokens of every array in the source collection. |
Descendants static |
IJEnumerable<JToken> | Returns a collection of tokens that contains the descendants of every token in the source collection. |
DescendantsAndSelf static |
IJEnumerable<JToken> | Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. |
Properties static |
IJEnumerable<JProperty> | Returns a collection of child properties of every object in the source collection. |
Value static (+1 overloads) |
U | Converts the value. |
Values static (+3 overloads) |
IJEnumerable<JToken> | Returns a collection of child values of every object in the source collection with the given key. |
Method Details
Ancestors static
Ancestors(source: IEnumerable
Returns a collection of tokens that contains the ancestors of every token in the source collection.
Parameters
- source (IEnumerable
) — An IEnumerable{T} of JToken that contains the source collection.
Returns IJEnumerable<JToken> — An IEnumerable{T} of JToken that contains the ancestors of every token in the source collection.
AncestorsAndSelf static
AncestorsAndSelf(source: IEnumerable
Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection.
Parameters
- source (IEnumerable
) — An IEnumerable{T} of JToken that contains the source collection.
Returns IJEnumerable<JToken> — An IEnumerable{T} of JToken that contains every token in the source collection, the ancestors of every token in the source collection.
AsJEnumerable static
AsJEnumerable(source: IEnumerable<JToken>): IJEnumerable<JToken>
Returns the input typed as IJEnumerable{T}.
Parameters
- source (IEnumerable<JToken>) — An IEnumerable{T} of JToken that contains the source collection.
Returns IJEnumerable<JToken> — The input typed as IJEnumerable{T}.
AsJEnumerable(source: IEnumerable
Returns the input typed as IJEnumerable{T}.
Parameters
- source (IEnumerable
) — An IEnumerable{T} of JToken that contains the source collection.
Returns IJEnumerable
Children static
Children(source: IEnumerable
Returns a collection of child tokens of every array in the source collection.
Parameters
- source (IEnumerable
) — An IEnumerable{T} of JToken that contains the source collection.
Returns IJEnumerable<JToken> — An IEnumerable{T} of JToken that contains the values of every token in the source collection.
Children(source: IEnumerable
Returns a collection of converted child tokens of every array in the source collection.
Parameters
- source (IEnumerable
) — An IEnumerable{T} of JToken that contains the source collection.
Returns IEnumerable — An IEnumerable{T} that contains the converted values of every token in the source collection.
Descendants static
Descendants(source: IEnumerable
Returns a collection of tokens that contains the descendants of every token in the source collection.
Parameters
- source (IEnumerable
) — An IEnumerable{T} of JToken that contains the source collection.
Returns IJEnumerable<JToken> — An IEnumerable{T} of JToken that contains the descendants of every token in the source collection.
DescendantsAndSelf static
DescendantsAndSelf(source: IEnumerable
Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection.
Parameters
- source (IEnumerable
) — An IEnumerable{T} of JToken that contains the source collection.
Returns IJEnumerable<JToken> — An IEnumerable{T} of JToken that contains every token in the source collection, and the descendants of every token in the source collection.
Properties static
Properties(source: IEnumerable<JObject>): IJEnumerable<JProperty>
Returns a collection of child properties of every object in the source collection.
Parameters
- source (IEnumerable<JObject>) — An IEnumerable{T} of JObject that contains the source collection.
Returns IJEnumerable<JProperty> — An IEnumerable{T} of JProperty that contains the properties of every object in the source collection.
Value static
Value(value: IEnumerable<JToken>): U
Converts the value.
Parameters
- value (IEnumerable<JToken>) — A JToken cast as a IEnumerable{T} of JToken.
Returns U — A converted value.
Value(value: IEnumerable
Converts the value.
Parameters
- value (IEnumerable
) — A JToken cast as a IEnumerable{T} of JToken.
Returns U — A converted value.
Values static
Values(source: IEnumerable<JToken>, key: object): IJEnumerable<JToken>
Returns a collection of child values of every object in the source collection with the given key.
Parameters
- source (IEnumerable<JToken>) — An IEnumerable{T} of JToken that contains the source collection.
- key (object) — The token key.
Returns IJEnumerable<JToken> — An IEnumerable{T} of JToken that contains the values of every token in the source collection with the given key.
Values(source: IEnumerable<JToken>): IJEnumerable<JToken>
Returns a collection of child values of every object in the source collection.
Parameters
- source (IEnumerable<JToken>) — An IEnumerable{T} of JToken that contains the source collection.
Returns IJEnumerable<JToken> — An IEnumerable{T} of JToken that contains the values of every token in the source collection.
Values(source: IEnumerable<JToken>, key: object): IEnumerable
Returns a collection of converted child values of every object in the source collection with the given key.
Parameters
- source (IEnumerable<JToken>) — An IEnumerable{T} of JToken that contains the source collection.
- key (object) — The token key.
Returns IEnumerable — An IEnumerable{T} that contains the converted values of every token in the source collection with the given key.
Values(source: IEnumerable<JToken>): IEnumerable
Returns a collection of converted child values of every object in the source collection.
Parameters
- source (IEnumerable<JToken>) — An IEnumerable{T} of JToken that contains the source collection.
Returns IEnumerable — An IEnumerable{T} that contains the converted values of every token in the source collection.