JsonInputFormatter Class

Syntax

public class JsonInputFormatter : InputFormatter, IInputFormatter

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.JsonInputFormatter

Constructors

Microsoft.AspNet.Mvc.JsonInputFormatter.JsonInputFormatter()
public JsonInputFormatter()
JsonInputFormatter(JsonSerializerSettings)
Arguments:
  • serializerSettings (JsonSerializerSettings) –
public JsonInputFormatter(JsonSerializerSettings serializerSettings)

Properties

SerializerSettings()

Gets or sets the @!:JsonSerializerSettings- used to configure the @!:JsonSerializer-.

Return type:JsonSerializerSettings
public JsonSerializerSettings SerializerSettings { get; set; }

Methods

CreateJsonReader(Microsoft.AspNet.Mvc.InputFormatterContext, System.IO.Stream, System.Text.Encoding)

Called during deserialization to get the @!:JsonReader-.

Arguments:
  • context (Microsoft.AspNet.Mvc.InputFormatterContext) – The [Microsoft.AspNet.Mvc.InputFormatterContext]() for the read.
  • readStream (System.IO.Stream) – The [System.IO.Stream]() from which to read.
  • effectiveEncoding (System.Text.Encoding) – The [System.Text.Encoding]() to use when reading.
Return type:

JsonReader

Returns:

The @!:JsonReader- used during deserialization.

public virtual JsonReader CreateJsonReader(InputFormatterContext context, Stream readStream, Encoding effectiveEncoding)
Microsoft.AspNet.Mvc.JsonInputFormatter.CreateJsonSerializer()

Called during deserialization to get the @!:JsonSerializer-.

Return type:JsonSerializer
Returns:The @!:JsonSerializer- used during serialization and deserialization.
public virtual JsonSerializer CreateJsonSerializer()
ReadRequestBodyAsync(Microsoft.AspNet.Mvc.InputFormatterContext)
Arguments:
Return type:

System.Threading.Tasks.Task{System.Object}

public override Task<object> ReadRequestBodyAsync(InputFormatterContext context)