SystemTextJsonInputFormatter Klasse

Definition

Eine TextInputFormatter für JSON-Inhalte, die verwendet JsonSerializer.

public ref class SystemTextJsonInputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextInputFormatter, Microsoft::AspNetCore::Mvc::Formatters::IInputFormatterExceptionPolicy
public class SystemTextJsonInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter, Microsoft.AspNetCore.Mvc.Formatters.IInputFormatterExceptionPolicy
type SystemTextJsonInputFormatter = class
    inherit TextInputFormatter
    interface IInputFormatterExceptionPolicy
Public Class SystemTextJsonInputFormatter
Inherits TextInputFormatter
Implements IInputFormatterExceptionPolicy
Vererbung
SystemTextJsonInputFormatter
Implementiert

Konstruktoren

SystemTextJsonInputFormatter(JsonOptions, ILogger<SystemTextJsonInputFormatter>)

Initialisiert eine neue Instanz von SystemTextJsonInputFormatter.

Eigenschaften

SerializerOptions

Ruft die ab, die JsonSerializerOptions zum Konfigurieren von JsonSerializerverwendet wird.

SupportedEncodings

Ruft die veränderliche Auflistung von Zeichencodierungen ab, die von diesem TextInputFormatterunterstützt werden. Die Codierungen werden beim Lesen der Daten verwendet.

(Geerbt von TextInputFormatter)
SupportedMediaTypes

Ruft die veränderliche Auflistung von Medientypelementen ab, die von diesem InputFormatterunterstützt werden.

(Geerbt von InputFormatter)

Methoden

CanRead(InputFormatterContext)

Bestimmt, ob dadurch IInputFormatter ein Objekt deserialisieren contextModelTypekann.

(Geerbt von InputFormatter)
CanReadType(Type)

Bestimmt, ob dadurch InputFormatter ein Objekt deserialisieren typekann.

(Geerbt von InputFormatter)
GetDefaultValueForType(Type)

Ruft den Standardwert für einen bestimmten Typ ab. Wird verwendet, um einen Standardwert zurückzugeben, wenn der Text keinen Inhalt enthält.

(Geerbt von InputFormatter)
GetSupportedContentTypes(String, Type)

Ruft eine gefilterte Liste von Inhaltstypen ab, die von für IInputFormatterobjectType und contentTypeunterstützt werden.

(Geerbt von InputFormatter)
ReadAsync(InputFormatterContext)

Liest ein Objekt aus dem Anforderungstext.

(Geerbt von InputFormatter)
ReadRequestBodyAsync(InputFormatterContext)

Liest ein Objekt aus dem Anforderungstext.

(Geerbt von TextInputFormatter)
ReadRequestBodyAsync(InputFormatterContext, Encoding)

Liest ein Objekt aus dem Anforderungstext.

SelectCharacterEncoding(InputFormatterContext)

Gibt einen Encoding basierend auf dem contextZeichensatz zurück.

(Geerbt von TextInputFormatter)

Explizite Schnittstellenimplementierungen

IInputFormatterExceptionPolicy.ExceptionPolicy

Ruft das Flag ab, um anzugeben, ob der Textkörpermodellbinder alle Ausnahmen behandeln soll. Wenn eine Ausnahme behandelt wird, wandelt der Textkörpermodellbinder die Ausnahme in Modellzustandsfehler um, andernfalls darf die Ausnahme weitergegeben werden.

Gilt für: