JsonSerializer.DeserializeAsyncEnumerable メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
DeserializeAsyncEnumerable<TValue>(PipeReader, JsonTypeInfo<TValue>, Boolean, CancellationToken)
UTF-8 でエンコードされたテキストを、ストリーミング方式で JSON 値のシーケンスを逆シリアル化するために使用できる IAsyncEnumerable<T> にラップします。
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Pipelines.PipeReader utf8Json, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo, bool topLevelValues, System.Threading.CancellationToken cancellationToken = default);
static member DeserializeAsyncEnumerable : System.IO.Pipelines.PipeReader * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> * bool * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
Public Function DeserializeAsyncEnumerable(Of TValue) (utf8Json As PipeReader, jsonTypeInfo As JsonTypeInfo(Of TValue), topLevelValues As Boolean, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TValue)
型パラメーター
- TValue
非同期的に逆シリアル化する要素型。
パラメーター
- utf8Json
- PipeReader
解析する JSON データ。
- jsonTypeInfo
- JsonTypeInfo<TValue>
変換する要素型に関するメタデータ。
- topLevelValues
- Boolean
最上位レベルの JSON 値のシーケンスから逆シリアル化するかどうかを指定します。
- cancellationToken
- CancellationToken
読み取り操作を取り消すために使用できる CancellationToken 。
返品
指定された JSON シーケンスの IAsyncEnumerable<T> 表現。
例外
utf8Json または jsonTypeInfo が null。
注釈
topLevelValuesが true に設定されている場合、PipeReader は、最上位レベルの JSON 値で区切られた空白のシーケンスとして扱い、各値をTValueに逆シリアル化しようとします。
topLevelValuesが false に設定されている場合、PipeReader を JSON 配列として扱い、各要素をTValueにシリアル化しようとします。
適用対象
DeserializeAsyncEnumerable<TValue>(Stream, JsonTypeInfo<TValue>, Boolean, CancellationToken)
UTF-8 でエンコードされたテキストを、ストリーミング方式で JSON 値のシーケンスを逆シリアル化するために使用できる IAsyncEnumerable<T> にラップします。
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Stream utf8Json, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo, bool topLevelValues, System.Threading.CancellationToken cancellationToken = default);
static member DeserializeAsyncEnumerable : System.IO.Stream * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> * bool * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
Public Function DeserializeAsyncEnumerable(Of TValue) (utf8Json As Stream, jsonTypeInfo As JsonTypeInfo(Of TValue), topLevelValues As Boolean, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TValue)
型パラメーター
- TValue
非同期的に逆シリアル化する要素型。
パラメーター
- utf8Json
- Stream
解析する JSON データ。
- jsonTypeInfo
- JsonTypeInfo<TValue>
変換する要素型に関するメタデータ。
- topLevelValues
- Boolean
最上位レベルの JSON 値のシーケンスから逆シリアル化するかどうかを指定します。
- cancellationToken
- CancellationToken
読み取り操作を取り消すために使用できる CancellationToken 。
返品
指定された JSON シーケンスの IAsyncEnumerable<T> 表現。
例外
utf8Json または jsonTypeInfo が null。
注釈
topLevelValuesがtrueに設定されている場合、ストリームは空白で区切られた最上位レベルの JSON 値のシーケンスとして扱われ、各値をTValueに逆シリアル化しようとします。
topLevelValuesが false に設定されている場合、ストリームを JSON 配列として扱い、各要素をTValueにシリアル化しようとします。
適用対象
DeserializeAsyncEnumerable<TValue>(Stream, Boolean, JsonSerializerOptions, CancellationToken)
UTF-8 でエンコードされたテキストを、ストリーミング方式で JSON 値のシーケンスを逆シリアル化するために使用できる IAsyncEnumerable<T> にラップします。
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Stream utf8Json, bool topLevelValues, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Stream utf8Json, bool topLevelValues, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member DeserializeAsyncEnumerable : System.IO.Stream * bool * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
static member DeserializeAsyncEnumerable : System.IO.Stream * bool * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
Public Function DeserializeAsyncEnumerable(Of TValue) (utf8Json As Stream, topLevelValues As Boolean, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TValue)
型パラメーター
- TValue
非同期的に逆シリアル化する要素型。
パラメーター
- utf8Json
- Stream
解析する JSON データ。
- topLevelValues
- Boolean
true 最上位の JSON 値のシーケンスから逆シリアル化する場合、または単一の最上位の配列から逆シリアル化する false 。
- options
- JsonSerializerOptions
読み取り中の動作を制御するオプション。
- cancellationToken
- CancellationToken
読み取り操作を取り消すために使用できる CancellationToken 。
返品
指定された JSON シーケンスの IAsyncEnumerable<T> 表現。
- 属性
例外
utf8Json は nullです。
注釈
topLevelValuesがtrueに設定されている場合、ストリームは空白で区切られた最上位レベルの JSON 値のシーケンスとして扱われ、各値をTValueに逆シリアル化しようとします。
topLevelValuesが false に設定されている場合、ストリームを JSON 配列として扱い、各要素をTValueにシリアル化しようとします。
適用対象
DeserializeAsyncEnumerable<TValue>(PipeReader, Boolean, JsonSerializerOptions, CancellationToken)
UTF-8 でエンコードされたテキストを、ストリーミング方式で JSON 値のシーケンスを逆シリアル化するために使用できる IAsyncEnumerable<T> にラップします。
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Pipelines.PipeReader utf8Json, bool topLevelValues, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Pipelines.PipeReader utf8Json, bool topLevelValues, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member DeserializeAsyncEnumerable : System.IO.Pipelines.PipeReader * bool * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
static member DeserializeAsyncEnumerable : System.IO.Pipelines.PipeReader * bool * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
Public Function DeserializeAsyncEnumerable(Of TValue) (utf8Json As PipeReader, topLevelValues As Boolean, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TValue)
型パラメーター
- TValue
非同期的に逆シリアル化する要素型。
パラメーター
- utf8Json
- PipeReader
解析する JSON データ。
- topLevelValues
- Boolean
true 最上位の JSON 値のシーケンスから逆シリアル化する場合、または単一の最上位の配列から逆シリアル化する false 。
- options
- JsonSerializerOptions
読み取り中の動作を制御するオプション。
- cancellationToken
- CancellationToken
読み取り操作を取り消すために使用できる CancellationToken 。
返品
指定された JSON シーケンスの IAsyncEnumerable<T> 表現。
- 属性
例外
utf8Json は nullです。
注釈
topLevelValuesが true に設定されている場合、PipeReader は、最上位レベルの JSON 値で区切られた空白のシーケンスとして扱い、各値をTValueに逆シリアル化しようとします。
topLevelValuesが false に設定されている場合、PipeReader を JSON 配列として扱い、各要素をTValueにシリアル化しようとします。
適用対象
DeserializeAsyncEnumerable<TValue>(PipeReader, JsonTypeInfo<TValue>, CancellationToken)
UTF-8 でエンコードされたテキストを、ストリーミング方式でルート レベルの JSON 配列を逆シリアル化するために使用できる IAsyncEnumerable<T> にラップします。
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Pipelines.PipeReader utf8Json, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo, System.Threading.CancellationToken cancellationToken = default);
static member DeserializeAsyncEnumerable : System.IO.Pipelines.PipeReader * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
Public Function DeserializeAsyncEnumerable(Of TValue) (utf8Json As PipeReader, jsonTypeInfo As JsonTypeInfo(Of TValue), Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TValue)
型パラメーター
- TValue
非同期的に逆シリアル化する要素型。
パラメーター
- utf8Json
- PipeReader
解析する JSON データ。
- jsonTypeInfo
- JsonTypeInfo<TValue>
変換する要素型に関するメタデータ。
- cancellationToken
- CancellationToken
読み取り操作を取り消すために使用できる CancellationToken 。
返品
指定された JSON 配列の IAsyncEnumerable<T> 表現。
例外
utf8Json または jsonTypeInfo が null。
適用対象
DeserializeAsyncEnumerable<TValue>(Stream, JsonSerializerOptions, CancellationToken)
UTF-8 でエンコードされたテキストを、ストリーミング方式でルート レベルの JSON 配列を逆シリアル化するために使用できる IAsyncEnumerable<T> にラップします。
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Stream utf8Json, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Stream utf8Json, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Stream utf8Json, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member DeserializeAsyncEnumerable : System.IO.Stream * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member DeserializeAsyncEnumerable : System.IO.Stream * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
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)
型パラメーター
- TValue
非同期的に逆シリアル化する要素型。
パラメーター
- utf8Json
- Stream
解析する JSON データ。
- options
- JsonSerializerOptions
読み取り中の動作を制御するオプション。
- cancellationToken
- CancellationToken
読み取り操作を取り消すために使用できる CancellationToken 。
返品
指定された JSON 配列の IAsyncEnumerable<T> 表現。
- 属性
例外
utf8Json は nullです。
キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。
適用対象
DeserializeAsyncEnumerable<TValue>(Stream, JsonTypeInfo<TValue>, CancellationToken)
UTF-8 でエンコードされたテキストを、ストリーミング方式でルート レベルの JSON 配列を逆シリアル化するために使用できる IAsyncEnumerable<T> にラップします。
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)
型パラメーター
- TValue
非同期的に逆シリアル化する要素型。
パラメーター
- utf8Json
- Stream
解析する JSON データ。
- jsonTypeInfo
- JsonTypeInfo<TValue>
変換する要素型に関するメタデータ。
- cancellationToken
- CancellationToken
読み取り操作を取り消すために使用できる CancellationToken 。
返品
指定された JSON 配列の IAsyncEnumerable<T> 表現。
例外
utf8Json または jsonTypeInfo が null。
キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。
適用対象
DeserializeAsyncEnumerable<TValue>(PipeReader, JsonSerializerOptions, CancellationToken)
UTF-8 でエンコードされたテキストを、ストリーミング方式でルート レベルの JSON 配列を逆シリアル化するために使用できる IAsyncEnumerable<T> にラップします。
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Pipelines.PipeReader utf8Json, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Collections.Generic.IAsyncEnumerable<TValue?> DeserializeAsyncEnumerable<TValue>(System.IO.Pipelines.PipeReader utf8Json, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member DeserializeAsyncEnumerable : System.IO.Pipelines.PipeReader * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
static member DeserializeAsyncEnumerable : System.IO.Pipelines.PipeReader * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Value>
Public Function DeserializeAsyncEnumerable(Of TValue) (utf8Json As PipeReader, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TValue)
型パラメーター
- TValue
非同期的に逆シリアル化する要素型。
パラメーター
- utf8Json
- PipeReader
解析する JSON データ。
- options
- JsonSerializerOptions
読み取り中の動作を制御するオプション。
- cancellationToken
- CancellationToken
読み取り操作を取り消すために使用できる CancellationToken 。
返品
指定された JSON 配列の IAsyncEnumerable<T> 表現。
- 属性
例外
utf8Json は nullです。