JsonInputFormatter Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A TextInputFormatter for JSON content.
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
- Inheritance
- Derived
- Implements
Constructors
JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider, Boolean, Boolean) |
Obsolete.
Initializes a new instance of JsonInputFormatter. |
JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider, Boolean) |
Obsolete.
Initializes a new instance of JsonInputFormatter. |
JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider, MvcOptions, MvcJsonOptions) |
Initializes a new instance of JsonInputFormatter. |
JsonInputFormatter(ILogger, JsonSerializerSettings, ArrayPool<Char>, ObjectPoolProvider) |
Obsolete.
Initializes a new instance of JsonInputFormatter. |
Properties
ExceptionPolicy |
Gets the flag to indicate if the body model binder should handle all exceptions. If an exception is handled, the body model binder converts the exception into model state errors, else the exception is allowed to propagate. |
SerializerSettings |
Gets the Newtonsoft.Json.JsonSerializerSettings used to configure the Newtonsoft.Json.JsonSerializer. |
SupportedEncodings |
Gets the mutable collection of character encodings supported by this TextInputFormatter. The encodings are used when reading the data. (Inherited from TextInputFormatter) |
SupportedMediaTypes |
Gets the mutable collection of media type elements supported by this InputFormatter. (Inherited from InputFormatter) |
Methods
CanRead(InputFormatterContext) |
Determines whether this IInputFormatter can deserialize an object of the
|
CanReadType(Type) |
Determines whether this InputFormatter can deserialize an object of the given
|
CreateJsonSerializer() |
Called during deserialization to get the Newtonsoft.Json.JsonSerializer. |
GetDefaultValueForType(Type) |
Gets the default value for a given type. Used to return a default value when the body contains no content. (Inherited from InputFormatter) |
GetSupportedContentTypes(String, Type) |
Gets a filtered list of content types which are supported by the IInputFormatter
for the |
ReadAsync(InputFormatterContext) |
Reads an object from the request body. (Inherited from InputFormatter) |
ReadRequestBodyAsync(InputFormatterContext, Encoding) |
Reads an object from the request body. |
ReadRequestBodyAsync(InputFormatterContext) |
Reads an object from the request body. (Inherited from TextInputFormatter) |
ReleaseJsonSerializer(JsonSerializer) |
Releases the |
SelectCharacterEncoding(InputFormatterContext) |
Returns an Encoding based on |