共用方式為


JsonInputFormatter 類別

定義

TextInputFormatterJSON 內容的 。

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 是否可以還原序列化 的 ModelType 物件 context

(繼承來源 InputFormatter)
CanReadType(Type)

判斷這 InputFormatter 是否可以還原序列化指定 type 的物件。

(繼承來源 InputFormatter)
CreateJsonSerializer()

在還原序列化期間呼叫 以取得 Newtonsoft.Json.JsonSerializer

GetDefaultValueForType(Type)

取得指定型別的預設值。 當本文不包含任何內容時,用來傳回預設值。

(繼承來源 InputFormatter)
GetSupportedContentTypes(String, Type)

取得 和 支援的內容類型 IInputFormatterobjectTypecontentType 篩選清單。

(繼承來源 InputFormatter)
ReadAsync(InputFormatterContext)

從要求本文讀取 物件。

(繼承來源 InputFormatter)
ReadRequestBodyAsync(InputFormatterContext)

從要求本文讀取 物件。

(繼承來源 TextInputFormatter)
ReadRequestBodyAsync(InputFormatterContext, Encoding)

從要求本文讀取 物件。

ReleaseJsonSerializer(JsonSerializer)

釋放 serializer 執行個體。

SelectCharacterEncoding(InputFormatterContext)

Encoding根據 context 的字元集傳回 。

(繼承來源 TextInputFormatter)

適用於