JsonSerializer.DeserializeAsyncEnumerable Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
DeserializeAsyncEnumerable<TValue>(Stream, JsonTypeInfo<TValue>, CancellationToken) |
Wraps the UTF-8 encoded text into an IAsyncEnumerable<T> that can be used to deserialize root-level JSON arrays in a streaming manner. |
DeserializeAsyncEnumerable<TValue>(Stream, JsonSerializerOptions, CancellationToken) |
Wraps the UTF-8 encoded text into an IAsyncEnumerable<T> that can be used to deserialize root-level JSON arrays in a streaming manner. |
DeserializeAsyncEnumerable<TValue>(Stream, JsonTypeInfo<TValue>, CancellationToken)
Wraps the UTF-8 encoded text into an IAsyncEnumerable<T> that can be used to deserialize root-level JSON arrays in a streaming manner.
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue> (System.IO.Stream utf8Json, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo, System.Threading.CancellationToken cancellationToken = default);
static member DeserializeAsyncEnumerable : System.IO.Stream * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
Public Function DeserializeAsyncEnumerable(Of TValue) (utf8Json As Stream, jsonTypeInfo As JsonTypeInfo(Of TValue), Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TValue)
Type Parameters
- TValue
The element type to deserialize asynchronously.
Parameters
- utf8Json
- Stream
JSON data to parse.
- jsonTypeInfo
- JsonTypeInfo<TValue>
Metadata about the element type to convert.
- cancellationToken
- CancellationToken
The CancellationToken that can be used to cancel the read operation.
Returns
An IAsyncEnumerable<T> representation of the provided JSON array.
Exceptions
utf8Json
or jsonTypeInfo
is null
.
The cancellation token was canceled. This exception is stored into the returned task.
Applies to
DeserializeAsyncEnumerable<TValue>(Stream, JsonSerializerOptions, CancellationToken)
Wraps the UTF-8 encoded text into an IAsyncEnumerable<T> that can be used to deserialize root-level JSON arrays in a streaming manner.
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue> (System.IO.Stream utf8Json, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
static member DeserializeAsyncEnumerable : System.IO.Stream * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
Public Function DeserializeAsyncEnumerable(Of TValue) (utf8Json As Stream, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TValue)
Type Parameters
- TValue
The element type to deserialize asynchronously.
Parameters
- utf8Json
- Stream
JSON data to parse.
- options
- JsonSerializerOptions
Options to control the behavior during reading.
- cancellationToken
- CancellationToken
The CancellationToken which may be used to cancel the read operation.
Returns
An IAsyncEnumerable<T> representation of the provided JSON array.
Exceptions
utf8Json
is null
.
The cancellation token was canceled. This exception is stored into the returned task.
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για