SystemTextJsonOutputFormatter Class

Definition

A TextOutputFormatter for JSON content that uses JsonSerializer.

public ref class SystemTextJsonOutputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextOutputFormatter
public class SystemTextJsonOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter
type SystemTextJsonOutputFormatter = class
    inherit TextOutputFormatter
Public Class SystemTextJsonOutputFormatter
Inherits TextOutputFormatter
Inheritance
SystemTextJsonOutputFormatter

Constructors

SystemTextJsonOutputFormatter(JsonSerializerOptions)

Initializes a new SystemTextJsonOutputFormatter instance.

Properties

SerializerOptions

Gets the JsonSerializerOptions used to configure the JsonSerializer.

SupportedEncodings

Gets the mutable collection of character encodings supported by this TextOutputFormatter. The encodings are used when writing the data.

(Inherited from TextOutputFormatter)
SupportedMediaTypes

Gets the mutable collection of media type elements supported by this OutputFormatter.

(Inherited from OutputFormatter)

Methods

CanWriteResult(OutputFormatterCanWriteContext) (Inherited from OutputFormatter)
CanWriteType(Type)

Returns a value indicating whether or not the given type can be written by this serializer.

(Inherited from OutputFormatter)
GetSupportedContentTypes(String, Type) (Inherited from OutputFormatter)
SelectCharacterEncoding(OutputFormatterWriteContext)

Determines the best Encoding amongst the supported encodings for reading or writing an HTTP entity body based on the provided content type.

(Inherited from TextOutputFormatter)
WriteAsync(OutputFormatterWriteContext) (Inherited from TextOutputFormatter)
WriteResponseBodyAsync(OutputFormatterWriteContext) (Inherited from TextOutputFormatter)
WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding)
WriteResponseHeaders(OutputFormatterWriteContext)

Sets the headers on HttpResponse object.

(Inherited from OutputFormatter)

Applies to