NewtonsoftJsonOutputFormatter Classe

Definizione

Oggetto TextOutputFormatter per il contenuto 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
Ereditarietà
NewtonsoftJsonOutputFormatter

Costruttori

NewtonsoftJsonOutputFormatter(JsonSerializerSettings, ArrayPool<Char>, MvcOptions)
Obsoleti.

Inizializza una nuova istanza di NewtonsoftJsonOutputFormatter.

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

Inizializza una nuova istanza di NewtonsoftJsonOutputFormatter.

Proprietà

SerializerSettings

Ottiene l'oggetto usato per configurare l'oggetto Newtonsoft.Json.JsonSerializerSettingsNewtonsoft.Json.JsonSerializer.

SupportedEncodings

Ottiene la raccolta modificabile di codifiche di caratteri supportate da questo TextOutputFormatteroggetto . Le codifiche vengono usate durante la scrittura dei dati.

(Ereditato da TextOutputFormatter)
SupportedMediaTypes

Ottiene la raccolta modificabile di elementi di tipo multimediale supportati da questo OutputFormatteroggetto .

(Ereditato da OutputFormatter)

Metodi

CanWriteResult(OutputFormatterCanWriteContext)

Determina se è IOutputFormatter possibile serializzare un oggetto del tipo specificato.

(Ereditato da OutputFormatter)
CanWriteType(Type)

Restituisce un valore che indica se il tipo specificato può essere scritto da questo serializzatore.

(Ereditato da OutputFormatter)
CreateJsonSerializer()

Chiamato durante la serializzazione per creare l'oggetto Newtonsoft.Json.JsonSerializer. Il contesto del formattatore passato consente di creare serializzatori specifici del contesto.

CreateJsonSerializer(OutputFormatterWriteContext)

Chiamato durante la serializzazione per creare l'oggetto Newtonsoft.Json.JsonSerializer. Il contesto del formattatore passato consente di creare serializzatori specifici del contesto.

CreateJsonWriter(TextWriter)

Chiamato durante la serializzazione per creare l'oggetto Newtonsoft.Json.JsonWriter.

GetSupportedContentTypes(String, Type)

Ottiene un elenco filtrato di tipi di contenuto supportati da IOutputFormatter per objectType e contentType.

(Ereditato da OutputFormatter)
SelectCharacterEncoding(OutputFormatterWriteContext)

Determina il valore migliore Encoding tra le codifica supportate per la lettura o la scrittura di un corpo di entità HTTP in base al tipo di contenuto specificato.

(Ereditato da TextOutputFormatter)
WriteAsync(OutputFormatterWriteContext)

Scrive l'oggetto rappresentato dalla contextproprietà Object.

(Ereditato da TextOutputFormatter)
WriteResponseBodyAsync(OutputFormatterWriteContext)

Scrive il corpo della risposta.

(Ereditato da TextOutputFormatter)
WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding)

Scrive il corpo della risposta.

WriteResponseHeaders(OutputFormatterWriteContext)

Imposta le intestazioni sull'oggetto HttpResponse .

(Ereditato da OutputFormatter)

Si applica a