NewtonsoftJsonPatchInputFormatter 类

定义

(TextInputFormatter application/json-patch+json) 内容的 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
继承

构造函数

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

初始化一个新 NewtonsoftJsonPatchInputFormatter 实例。

属性

ExceptionPolicy

获取标志,以指示正文模型联编程序是否应处理所有异常。 如果处理了异常,主体模型联编程序会将异常转换为模型状态错误,否则允许该异常传播。

SerializerSettings

获取 Newtonsoft.Json.JsonSerializerSettings 用于配置 的 Newtonsoft.Json.JsonSerializer

(继承自 NewtonsoftJsonInputFormatter)
SupportedEncodings

获取此 TextInputFormatter支持的字符编码的可变集合。 读取数据时使用编码。

(继承自 TextInputFormatter)
SupportedMediaTypes

获取此 InputFormatter支持的媒体类型元素的可变集合。

(继承自 InputFormatter)

方法

CanRead(InputFormatterContext)

确定这IInputFormatter是否可以反序列化 的 ModelType对象context

CanReadType(Type)

确定这 InputFormatter 是否可以反序列化给定 type的 对象。

(继承自 InputFormatter)
CreateJsonSerializer()

在反序列化期间调用以获取 Newtonsoft.Json.JsonSerializer。 通过传递的格式化程序上下文,可以创建特定于上下文的序列化程序。

(继承自 NewtonsoftJsonInputFormatter)
CreateJsonSerializer(InputFormatterContext)

在反序列化期间调用以获取 Newtonsoft.Json.JsonSerializer。 通过传递的格式化程序上下文,可以创建特定于上下文的序列化程序。

(继承自 NewtonsoftJsonInputFormatter)
GetDefaultValueForType(Type)

获取给定类型的默认值。 用于在正文不包含任何内容时返回默认值。

(继承自 InputFormatter)
GetSupportedContentTypes(String, Type)

获取 和 contentType支持的内容类型IInputFormatterobjectType的筛选列表。

(继承自 InputFormatter)
ReadAsync(InputFormatterContext)

从请求正文中读取 对象。

(继承自 InputFormatter)
ReadRequestBodyAsync(InputFormatterContext)

从请求正文中读取 对象。

(继承自 TextInputFormatter)
ReadRequestBodyAsync(InputFormatterContext, Encoding)

从请求正文中读取 对象。

ReleaseJsonSerializer(JsonSerializer)

释放 serializer 实例。

(继承自 NewtonsoftJsonInputFormatter)
SelectCharacterEncoding(InputFormatterContext)

基于 context的字符集返回 Encoding

(继承自 TextInputFormatter)

适用于