HttpContentJsonExtensions.ReadFromJsonAsync Methode

Definition

Überlädt

Name Beschreibung
ReadFromJsonAsync(HttpContent, Type, CancellationToken)

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

ReadFromJsonAsync(HttpContent, Type, JsonSerializerOptions, CancellationToken)

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

ReadFromJsonAsync(HttpContent, Type, JsonSerializerContext, CancellationToken)

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

ReadFromJsonAsync<T>(HttpContent, CancellationToken)

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

ReadFromJsonAsync<T>(HttpContent, JsonSerializerOptions, CancellationToken)

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

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

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

ReadFromJsonAsync(HttpContent, Type, CancellationToken)

Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

[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)

Parameter

content
HttpContent

Der Inhalt, aus dem gelesen werden soll.

type
Type

Der Typ des Objekts, das deserialisiert und zurückgegeben werden soll.

cancellationToken
CancellationToken

Ein Abbruchtoken, das von anderen Objekten oder Threads verwendet werden kann, um eine Kündigungsbenachrichtigung zu erhalten.

Gibt zurück

Das Aufgabenobjekt, das den asynchronen Vorgang darstellt.

Attribute

Ausnahmen

Das Abbruchtoken wurde abgebrochen. Diese Ausnahme wird in der zurückgegebenen Aufgabe gespeichert.

Gilt für:

ReadFromJsonAsync(HttpContent, Type, JsonSerializerOptions, CancellationToken)

Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

[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)

Parameter

content
HttpContent

Der Inhalt, aus dem gelesen werden soll.

type
Type

Der Typ des Objekts, das deserialisiert und zurückgegeben werden soll.

options
JsonSerializerOptions

Optionen zum Steuern des Verhaltens während der Deserialisierung. Die Standardoptionen sind die von Web.

cancellationToken
CancellationToken

Ein Abbruchtoken, das von anderen Objekten oder Threads verwendet werden kann, um eine Kündigungsbenachrichtigung zu erhalten.

Gibt zurück

Das Aufgabenobjekt, das den asynchronen Vorgang darstellt.

Attribute

Ausnahmen

Das Abbruchtoken wurde abgebrochen. Diese Ausnahme wird in der zurückgegebenen Aufgabe gespeichert.

Gilt für:

ReadFromJsonAsync(HttpContent, Type, JsonSerializerContext, CancellationToken)

Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

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)

Parameter

content
HttpContent

Der Inhalt, aus dem gelesen werden soll.

type
Type

Der Typ des Objekts, das deserialisiert und zurückgegeben werden soll.

context
JsonSerializerContext

Der jsonSerializerContext, der zum Steuern des Deserialisierungsverhaltens verwendet wird.

cancellationToken
CancellationToken

Ein Abbruchtoken, das von anderen Objekten oder Threads verwendet werden kann, um eine Kündigungsbenachrichtigung zu erhalten.

Gibt zurück

Das Aufgabenobjekt, das den asynchronen Vorgang darstellt.

Ausnahmen

Das Abbruchtoken wurde abgebrochen. Diese Ausnahme wird in der zurückgegebenen Aufgabe gespeichert.

Gilt für:

ReadFromJsonAsync<T>(HttpContent, CancellationToken)

Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

[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)

Typparameter

T

Der Zieltyp, der deserialisiert werden soll.

Parameter

content
HttpContent

Der Inhalt, aus dem gelesen werden soll.

cancellationToken
CancellationToken

Ein Abbruchtoken, das von anderen Objekten oder Threads verwendet werden kann, um eine Kündigungsbenachrichtigung zu erhalten.

Gibt zurück

Task<T>

Das Aufgabenobjekt, das den asynchronen Vorgang darstellt.

Attribute

Ausnahmen

Das Abbruchtoken wurde abgebrochen. Diese Ausnahme wird in der zurückgegebenen Aufgabe gespeichert.

Gilt für:

ReadFromJsonAsync<T>(HttpContent, JsonSerializerOptions, CancellationToken)

Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

[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)

Typparameter

T

Der Zieltyp, der deserialisiert werden soll.

Parameter

content
HttpContent

Der Inhalt, aus dem gelesen werden soll.

options
JsonSerializerOptions

Optionen zum Steuern des Verhaltens während der Deserialisierung. Die Standardoptionen sind die von Web.

cancellationToken
CancellationToken

Ein Abbruchtoken, das von anderen Objekten oder Threads verwendet werden kann, um eine Kündigungsbenachrichtigung zu erhalten.

Gibt zurück

Task<T>

Das Aufgabenobjekt, das den asynchronen Vorgang darstellt.

Attribute

Ausnahmen

Das Abbruchtoken wurde abgebrochen. Diese Ausnahme wird in der zurückgegebenen Aufgabe gespeichert.

Gilt für:

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

Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs
Quelle:
HttpContentJsonExtensions.cs

Liest den HTTP-Inhalt und gibt den Wert zurück, der aus der Deserialisierung des Inhalts als JSON in einem asynchronen Vorgang resultiert.

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)

Typparameter

T

Der Zieltyp, der deserialisiert werden soll.

Parameter

content
HttpContent

Der Inhalt, aus dem gelesen werden soll.

jsonTypeInfo
JsonTypeInfo<T>

Die jsonTypeInfo, die zum Steuern des Deserialisierungsverhaltens verwendet wird.

cancellationToken
CancellationToken

Ein Abbruchtoken, das von anderen Objekten oder Threads verwendet werden kann, um eine Kündigungsbenachrichtigung zu erhalten.

Gibt zurück

Task<T>

Das Aufgabenobjekt, das den asynchronen Vorgang darstellt.

Ausnahmen

Das Abbruchtoken wurde abgebrochen. Diese Ausnahme wird in der zurückgegebenen Aufgabe gespeichert.

Gilt für: