NewtonsoftJsonOutputFormatter Classe

Définition

pour TextOutputFormatter le contenu JSON.

public ref class NewtonsoftJsonOutputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextOutputFormatter
public class NewtonsoftJsonOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter
type NewtonsoftJsonOutputFormatter = class
    inherit TextOutputFormatter
Public Class NewtonsoftJsonOutputFormatter
Inherits TextOutputFormatter
Héritage
NewtonsoftJsonOutputFormatter

Constructeurs

NewtonsoftJsonOutputFormatter(JsonSerializerSettings, ArrayPool<Char>, MvcOptions)
Obsolète.

Initialise une nouvelle instance de NewtonsoftJsonOutputFormatter.

NewtonsoftJsonOutputFormatter(JsonSerializerSettings, ArrayPool<Char>, MvcOptions, MvcNewtonsoftJsonOptions)

Initialise une nouvelle instance de NewtonsoftJsonOutputFormatter.

Propriétés

SerializerSettings

Obtient le Newtonsoft.Json.JsonSerializerSettings utilisé pour configurer le Newtonsoft.Json.JsonSerializer.

SupportedEncodings

Obtient la collection mutable d’encodages de caractères pris en charge par ce TextOutputFormatter. Les encodages sont utilisés lors de l’écriture des données.

(Hérité de TextOutputFormatter)
SupportedMediaTypes

Obtient la collection mutable d’éléments de type de média pris en charge par ce OutputFormatter.

(Hérité de OutputFormatter)

Méthodes

CanWriteResult(OutputFormatterCanWriteContext)

Détermine si cela IOutputFormatter peut sérialiser un objet du type spécifié.

(Hérité de OutputFormatter)
CanWriteType(Type)

Retourne une valeur indiquant si le type donné peut ou non être écrit par ce sérialiseur.

(Hérité de OutputFormatter)
CreateJsonSerializer()

Appelé pendant la sérialisation pour créer le Newtonsoft.Json.JsonSerializer. Le contexte du formateur qui est passé donne la possibilité de créer un sérialiseur spécifique au contexte.

CreateJsonSerializer(OutputFormatterWriteContext)

Appelé pendant la sérialisation pour créer le Newtonsoft.Json.JsonSerializer. Le contexte du formateur qui est passé donne la possibilité de créer un sérialiseur spécifique au contexte.

CreateJsonWriter(TextWriter)

Appelé pendant la sérialisation pour créer le Newtonsoft.Json.JsonWriter.

GetSupportedContentTypes(String, Type)

Obtient une liste filtrée des types de contenu pris en charge par pour IOutputFormatter et contentTypeobjectType .

(Hérité de OutputFormatter)
SelectCharacterEncoding(OutputFormatterWriteContext)

Détermine le meilleur Encoding parmi les encodages pris en charge pour la lecture ou l’écriture d’un corps d’entité HTTP en fonction du type de contenu fourni.

(Hérité de TextOutputFormatter)
WriteAsync(OutputFormatterWriteContext)

Écrit l’objet représenté par contextla propriété Object de .

(Hérité de TextOutputFormatter)
WriteResponseBodyAsync(OutputFormatterWriteContext)

Écrit le corps de la réponse.

(Hérité de TextOutputFormatter)
WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding)

Écrit le corps de la réponse.

WriteResponseHeaders(OutputFormatterWriteContext)

Définit les en-têtes sur l’objet HttpResponse .

(Hérité de OutputFormatter)

S’applique à