Click or drag to resize
Json.NET

JTokenReadFromAsync Method (JsonReader, CancellationToken)

 
Asynchronously creates a JToken from a JsonReader.

Namespace:  Newtonsoft.Json.Linq
Assembly:  Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntax
C#
public static Task<JToken> ReadFromAsync(
	JsonReader reader,
	CancellationToken cancellationToken = null
)

Parameters

reader
Type: Newtonsoft.JsonJsonReader
An JsonReader positioned at the token to read into this JToken.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The token to monitor for cancellation requests. The default value is None.

Return Value

Type: TaskJToken
A TaskTResult that represents the asynchronous creation. The Result property returns a JToken that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader.
See Also