JsonInputFormatter Класс

Определение

Для TextInputFormatter содержимого 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
Наследование
Производный
Реализации

Конструкторы

JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider)
Устаревшие..

Инициализирует новый экземпляр JsonInputFormatter.

JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider, Boolean)
Устаревшие..

Инициализирует новый экземпляр JsonInputFormatter.

JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider, Boolean, Boolean)
Устаревшие..

Инициализирует новый экземпляр JsonInputFormatter.

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

Инициализирует новый экземпляр JsonInputFormatter.

Свойства

ExceptionPolicy

Возвращает флаг, указывающий, должен ли связыватель модели тела обрабатывать все исключения. Если исключение обработано, связыватель модели тела преобразует исключение в ошибки состояния модели, в противном случае исключение может распространяться.

SerializerSettings

Возвращает объект , используемый Newtonsoft.Json.JsonSerializerSettings для настройки Newtonsoft.Json.JsonSerializer.

SupportedEncodings

Возвращает изменяемую коллекцию кодировки символов, поддерживаемую данным .TextInputFormatter Кодировки используются при чтении данных.

(Унаследовано от TextInputFormatter)
SupportedMediaTypes

Возвращает изменяемую коллекцию элементов типа мультимедиа, поддерживаемых данным .InputFormatter

(Унаследовано от InputFormatter)

Методы

CanRead(InputFormatterContext)

Определяет, может ли объект IInputFormatter десериализовать contextModelTypeобъект объекта .

(Унаследовано от InputFormatter)
CanReadType(Type)

Определяет, может ли данный объект InputFormatter десериализовать объект заданного typeобъекта .

(Унаследовано от InputFormatter)
CreateJsonSerializer()

Вызывается во время десериализации для получения Newtonsoft.Json.JsonSerializer.

GetDefaultValueForType(Type)

Возвращает значение по умолчанию для заданного типа. Используется для возврата значения по умолчанию, если текст не содержит содержимого.

(Унаследовано от InputFormatter)
GetSupportedContentTypes(String, Type)

Возвращает отфильтрованный список типов контента, поддерживаемых IInputFormatter для objectType и contentType.

(Унаследовано от InputFormatter)
ReadAsync(InputFormatterContext)

Считывает объект из текста запроса.

(Унаследовано от InputFormatter)
ReadRequestBodyAsync(InputFormatterContext)

Считывает объект из текста запроса.

(Унаследовано от TextInputFormatter)
ReadRequestBodyAsync(InputFormatterContext, Encoding)

Считывает объект из текста запроса.

ReleaseJsonSerializer(JsonSerializer)

Выпускает экземпляр serializer.

SelectCharacterEncoding(InputFormatterContext)

Возвращает на Encoding основе contextнабора символов.

(Унаследовано от TextInputFormatter)

Применяется к