HttpContentJsonExtensions.ReadFromJsonAsync メソッド

定義

オーバーロード

名前 説明
ReadFromJsonAsync(HttpContent, Type, CancellationToken)

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

ReadFromJsonAsync(HttpContent, Type, JsonSerializerOptions, CancellationToken)

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

ReadFromJsonAsync(HttpContent, Type, JsonSerializerContext, CancellationToken)

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

ReadFromJsonAsync<T>(HttpContent, CancellationToken)

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

ReadFromJsonAsync<T>(HttpContent, JsonSerializerOptions, CancellationToken)

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

ReadFromJsonAsync<T>(HttpContent, JsonTypeInfo<T>, CancellationToken)

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

ReadFromJsonAsync(HttpContent, Type, CancellationToken)

ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[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.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<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 ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
static member ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function ReadFromJsonAsync (content As HttpContent, type As Type, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

パラメーター

content
HttpContent

読み取るコンテンツ。

type
Type

逆シリアル化して返すオブジェクトの型。

cancellationToken
CancellationToken

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

非同期操作を表すタスク オブジェクト。

属性

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

適用対象

ReadFromJsonAsync(HttpContent, Type, JsonSerializerOptions, CancellationToken)

ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[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.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, 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.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, 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. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[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.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<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 ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
static member ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
[<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 ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function ReadFromJsonAsync (content As HttpContent, type As Type, options As JsonSerializerOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)
<Extension()>
Public Function ReadFromJsonAsync (content As HttpContent, type As Type, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

パラメーター

content
HttpContent

読み取るコンテンツ。

type
Type

逆シリアル化して返すオブジェクトの型。

options
JsonSerializerOptions

逆シリアル化中の動作を制御するオプション。 既定のオプションは、 Webで指定されたオプションです。

cancellationToken
CancellationToken

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

非同期操作を表すタスク オブジェクト。

属性

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

適用対象

ReadFromJsonAsync(HttpContent, Type, JsonSerializerContext, CancellationToken)

ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Text.Json.Serialization.JsonSerializerContext context, System.Threading.CancellationToken cancellationToken = default);
static member ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Text.Json.Serialization.JsonSerializerContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function ReadFromJsonAsync (content As HttpContent, type As Type, context As JsonSerializerContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

パラメーター

content
HttpContent

読み取るコンテンツ。

type
Type

逆シリアル化して返すオブジェクトの型。

context
JsonSerializerContext

逆シリアル化の動作を制御するために使用される JsonSerializerContext。

cancellationToken
CancellationToken

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

非同期操作を表すタスク オブジェクト。

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

適用対象

ReadFromJsonAsync<T>(HttpContent, CancellationToken)

ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[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.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<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 ReadFromJsonAsync : System.Net.Http.HttpContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
static member ReadFromJsonAsync : System.Net.Http.HttpContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
<Extension()>
Public Function ReadFromJsonAsync(Of T) (content As HttpContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)

型パラメーター

T

逆シリアル化先のターゲット型。

パラメーター

content
HttpContent

読み取るコンテンツ。

cancellationToken
CancellationToken

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

Task<T>

非同期操作を表すタスク オブジェクト。

属性

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

適用対象

ReadFromJsonAsync<T>(HttpContent, JsonSerializerOptions, CancellationToken)

ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[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.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, 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.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, 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. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[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.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<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 ReadFromJsonAsync : System.Net.Http.HttpContent * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
static member ReadFromJsonAsync : System.Net.Http.HttpContent * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
[<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 ReadFromJsonAsync : System.Net.Http.HttpContent * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
<Extension()>
Public Function ReadFromJsonAsync(Of T) (content As HttpContent, options As JsonSerializerOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
<Extension()>
Public Function ReadFromJsonAsync(Of T) (content As HttpContent, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)

型パラメーター

T

逆シリアル化先のターゲット型。

パラメーター

content
HttpContent

読み取るコンテンツ。

options
JsonSerializerOptions

逆シリアル化中の動作を制御するオプション。 既定のオプションは、 Webで指定されたオプションです。

cancellationToken
CancellationToken

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

Task<T>

非同期操作を表すタスク オブジェクト。

属性

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

適用対象

ReadFromJsonAsync<T>(HttpContent, JsonTypeInfo<T>, CancellationToken)

ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs
ソース:
HttpContentJsonExtensions.cs

HTTP コンテンツを読み取り、非同期操作でコンテンツを JSON として逆シリアル化した結果の値を返します。

public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> jsonTypeInfo, System.Threading.CancellationToken cancellationToken = default);
static member ReadFromJsonAsync : System.Net.Http.HttpContent * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
<Extension()>
Public Function ReadFromJsonAsync(Of T) (content As HttpContent, jsonTypeInfo As JsonTypeInfo(Of T), Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)

型パラメーター

T

逆シリアル化先のターゲット型。

パラメーター

content
HttpContent

読み取るコンテンツ。

jsonTypeInfo
JsonTypeInfo<T>

逆シリアル化の動作を制御するために使用される JsonTypeInfo。

cancellationToken
CancellationToken

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

Task<T>

非同期操作を表すタスク オブジェクト。

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

適用対象