Show / Hide Table of Contents

    Class JsonSerializationOutputFormatter

    This class handles serialization of objects to JSON using JsonFormatter.

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter
    Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter
    JsonSerializationOutputFormatter
    Implements
    Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter
    Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseTypeMetadataProvider
    Inherited Members
    Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter.SelectCharacterEncoding(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext)
    Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter.WriteAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext)
    Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter.WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext)
    Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter.SupportedEncodings
    Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter.CanWriteType(System.Type)
    Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter.GetSupportedContentTypes(System.String, System.Type)
    Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter.CanWriteResult(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext)
    Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter.WriteResponseHeaders(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext)
    Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter.SupportedMediaTypes
    Namespace: Cuemon.AspNetCore.Mvc.Formatters.Json
    Assembly: Cuemon.AspNetCore.Mvc.Formatters.Json.dll
    Syntax
    public class JsonSerializationOutputFormatter : TextOutputFormatter, IOutputFormatter, IApiResponseTypeMetadataProvider

    Constructors

    | Improve this Doc

    JsonSerializationOutputFormatter(JsonFormatterOptions)

    Initializes a new instance of the JsonSerializationOutputFormatter class.

    Declaration
    public JsonSerializationOutputFormatter(JsonFormatterOptions formatterOptions)
    Parameters
    Type Name Description
    JsonFormatterOptions formatterOptions

    Methods

    | Improve this Doc

    WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding)

    Write response body as an asynchronous operation.

    Declaration
    public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context

    The formatter context associated with the call.

    System.Text.Encoding selectedEncoding

    The System.Text.Encoding that should be used to write the response.

    Returns
    Type Description
    System.Threading.Tasks.Task

    A task which can write the response body.

    Overrides
    Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter.WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext, System.Text.Encoding)

    Implements

    Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter
    Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseTypeMetadataProvider

    Extension Methods

    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, DateTime, Action<TimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, DateTime>, Action<TimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Byte[], Action<ContentBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, Byte[]>, Action<ContentBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, DateTime, Byte[], Action<ContentTimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, DateTime>, Func<T, Byte[]>, Action<ContentTimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, DateTime, Func<T, Byte[]>, Action<ContentTimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, DateTime>, Byte[], Action<ContentTimeBasedOptions>)
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX