Freigeben über


NewtonsoftJsonPatchInputFormatter Klasse

Definition

Ein TextInputFormatter für JSON-Patch-Inhalt (application/json-patch+json).

public ref class NewtonsoftJsonPatchInputFormatter : Microsoft::AspNetCore::Mvc::Formatters::NewtonsoftJsonInputFormatter
public class NewtonsoftJsonPatchInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter
type NewtonsoftJsonPatchInputFormatter = class
    inherit NewtonsoftJsonInputFormatter
Public Class NewtonsoftJsonPatchInputFormatter
Inherits NewtonsoftJsonInputFormatter
Vererbung

Konstruktoren

NewtonsoftJsonPatchInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider, MvcOptions, MvcNewtonsoftJsonOptions)

Initialisiert eine neue Instanz von NewtonsoftJsonPatchInputFormatter.

Eigenschaften

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.

SerializerSettings

Ruft die ab, die Newtonsoft.Json.JsonSerializerSettings zum Konfigurieren von Newtonsoft.Json.JsonSerializerverwendet wird.

(Geerbt von NewtonsoftJsonInputFormatter)
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.

CanReadType(Type)

Bestimmt, ob dadurch InputFormatter ein Objekt deserialisieren typekann.

(Geerbt von InputFormatter)
CreateJsonSerializer()

Wird während der Deserialisierung aufgerufen, um das Newtonsoft.Json.JsonSerializerabzurufen. Der übergebene Formatierungskontext ermöglicht das Erstellen eines kontextspezifischen Serialisierungsprogramms.

(Geerbt von NewtonsoftJsonInputFormatter)
CreateJsonSerializer(InputFormatterContext)

Wird während der Deserialisierung aufgerufen, um das Newtonsoft.Json.JsonSerializerabzurufen. Der übergebene Formatierungskontext ermöglicht das Erstellen eines kontextspezifischen Serialisierungsprogramms.

(Geerbt von NewtonsoftJsonInputFormatter)
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.

ReleaseJsonSerializer(JsonSerializer)

Gibt die serializer-Instanz frei.

(Geerbt von NewtonsoftJsonInputFormatter)
SelectCharacterEncoding(InputFormatterContext)

Gibt einen Encoding basierend auf dem contextZeichensatz zurück.

(Geerbt von TextInputFormatter)

Gilt für: