共用方式為


NewtonsoftJsonInputFormatter 類別

定義

TextInputFormatterJSON 內容的 。

public ref class NewtonsoftJsonInputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextInputFormatter, Microsoft::AspNetCore::Mvc::Formatters::IInputFormatterExceptionPolicy
public class NewtonsoftJsonInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter, Microsoft.AspNetCore.Mvc.Formatters.IInputFormatterExceptionPolicy
type NewtonsoftJsonInputFormatter = class
    inherit TextInputFormatter
    interface IInputFormatterExceptionPolicy
Public Class NewtonsoftJsonInputFormatter
Inherits TextInputFormatter
Implements IInputFormatterExceptionPolicy
繼承
NewtonsoftJsonInputFormatter
衍生
實作

建構函式

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

初始化 NewtonsoftJsonInputFormatter 的新執行個體。

屬性

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 。 傳遞的格式器內容可讓您建立內容特定的序列化程式。

CreateJsonSerializer(InputFormatterContext)

在還原序列化期間呼叫 ,以取得 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)

適用於