JsonSerializer.DeserializeAsyncEnumerable Metodo

Definizione

Overload

DeserializeAsyncEnumerable<TValue>(Stream, JsonSerializerOptions, CancellationToken)

Esegue il wrapping del testo codificato UTF-8 in un IAsyncEnumerable<T> oggetto che può essere usato per deserializzare le matrici JSON a livello radice in modo di streaming.

DeserializeAsyncEnumerable<TValue>(Stream, JsonTypeInfo<TValue>, CancellationToken)

Esegue il wrapping del testo codificato UTF-8 in un IAsyncEnumerable<T> oggetto che può essere usato per deserializzare le matrici JSON a livello radice in modo di streaming.

DeserializeAsyncEnumerable<TValue>(Stream, JsonSerializerOptions, CancellationToken)

Origine:
JsonSerializer.Read.Stream.cs
Origine:
JsonSerializer.Read.Stream.cs
Origine:
JsonSerializer.Read.Stream.cs

Esegue il wrapping del testo codificato UTF-8 in un IAsyncEnumerable<T> oggetto che può essere usato per deserializzare le matrici JSON a livello radice in modo di streaming.

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)

Parametri di tipo

TValue

Tipo di elemento per deserializzare in modo asincrono.

Parametri

utf8Json
Stream

Dati JSON da analizzare.

options
JsonSerializerOptions

Opzioni per controllare il comportamento durante la lettura.

cancellationToken
CancellationToken

Oggetto CancellationToken che può essere usato per annullare l'operazione di lettura.

Restituisce

Rappresentazione IAsyncEnumerable<T> della matrice JSON fornita.

Eccezioni

utf8Json è null.

Il token di annullamento è stato annullato. Questa eccezione viene archiviata nell'attività restituita.

Si applica a

DeserializeAsyncEnumerable<TValue>(Stream, JsonTypeInfo<TValue>, CancellationToken)

Origine:
JsonSerializer.Read.Stream.cs
Origine:
JsonSerializer.Read.Stream.cs
Origine:
JsonSerializer.Read.Stream.cs

Esegue il wrapping del testo codificato UTF-8 in un IAsyncEnumerable<T> oggetto che può essere usato per deserializzare le matrici JSON a livello radice in modo di streaming.

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)

Parametri di tipo

TValue

Tipo di elemento per deserializzare in modo asincrono.

Parametri

utf8Json
Stream

Dati JSON da analizzare.

jsonTypeInfo
JsonTypeInfo<TValue>

Metadati sul tipo di elemento da convertire.

cancellationToken
CancellationToken

Oggetto CancellationToken che può essere usato per annullare l'operazione di lettura.

Restituisce

Rappresentazione IAsyncEnumerable<T> della matrice JSON fornita.

Eccezioni

utf8Json o jsonTypeInfo è null.

Il token di annullamento è stato annullato. Questa eccezione viene archiviata nell'attività restituita.

Si applica a