JsonInputFormatter Klasa

Definicja

A TextInputFormatter dla zawartości JSON.

public ref class JsonInputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextInputFormatter
public ref class JsonInputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextInputFormatter, Microsoft::AspNetCore::Mvc::Formatters::IInputFormatterExceptionPolicy
public class JsonInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter
public class JsonInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter, Microsoft.AspNetCore.Mvc.Formatters.IInputFormatterExceptionPolicy
type JsonInputFormatter = class
    inherit TextInputFormatter
type JsonInputFormatter = class
    inherit TextInputFormatter
    interface IInputFormatterExceptionPolicy
Public Class JsonInputFormatter
Inherits TextInputFormatter
Public Class JsonInputFormatter
Inherits TextInputFormatter
Implements IInputFormatterExceptionPolicy
Dziedziczenie
Pochodne
Implementuje

Konstruktory

JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider)
Przestarzałe.

Inicjuje nowe wystąpienie klasy JsonInputFormatter.

JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider, Boolean)
Przestarzałe.

Inicjuje nowe wystąpienie klasy JsonInputFormatter.

JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider, Boolean, Boolean)
Przestarzałe.

Inicjuje nowe wystąpienie klasy JsonInputFormatter.

JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider, MvcOptions, MvcJsonOptions)

Inicjuje nowe wystąpienie klasy JsonInputFormatter.

Właściwości

ExceptionPolicy

Pobiera flagę wskazującą, czy powiązanie modelu treści powinno obsługiwać wszystkie wyjątki. Jeśli wyjątek jest obsługiwany, binder modelu ciała konwertuje wyjątek na błędy stanu modelu, a w przeciwnym razie wyjątek może być propagowany.

SerializerSettings

Pobiera element Newtonsoft.Json.JsonSerializerSettings używany do konfigurowania .Newtonsoft.Json.JsonSerializer

SupportedEncodings

Pobiera modyfikowalny zbiór kodowań znaków obsługiwanych przez ten TextInputFormatterelement . Kodowanie jest używane podczas odczytywania danych.

(Odziedziczone po TextInputFormatter)
SupportedMediaTypes

Pobiera modyfikowalny zbiór elementów typu nośnika obsługiwanych przez ten InputFormatterelement .

(Odziedziczone po InputFormatter)

Metody

CanRead(InputFormatterContext)

Określa, czy może to IInputFormatter deserializować obiekt contextobiektu .ModelType

(Odziedziczone po InputFormatter)
CanReadType(Type)

Określa, czy może to InputFormatter deserializować obiekt danego typeobiektu .

(Odziedziczone po InputFormatter)
CreateJsonSerializer()

Wywoływana podczas deserializacji w celu pobrania elementu Newtonsoft.Json.JsonSerializer.

GetDefaultValueForType(Type)

Pobiera wartość domyślną dla danego typu. Służy do zwracania wartości domyślnej, gdy treść nie zawiera zawartości.

(Odziedziczone po InputFormatter)
GetSupportedContentTypes(String, Type)

Pobiera filtrowaną listę typów zawartości, które są obsługiwane przez IInputFormatter element dla elementów objectType i contentType.

(Odziedziczone po InputFormatter)
ReadAsync(InputFormatterContext)

Odczytuje obiekt z treści żądania.

(Odziedziczone po InputFormatter)
ReadRequestBodyAsync(InputFormatterContext)

Odczytuje obiekt z treści żądania.

(Odziedziczone po TextInputFormatter)
ReadRequestBodyAsync(InputFormatterContext, Encoding)

Odczytuje obiekt z treści żądania.

ReleaseJsonSerializer(JsonSerializer)

serializer Zwalnia wystąpienie.

SelectCharacterEncoding(InputFormatterContext)

Zwraca obiekt Encoding na contextpodstawie zestawu znaków .

(Odziedziczone po TextInputFormatter)

Dotyczy