Unosquare
    Show / Hide Table of Contents

    Class ResponseSerializer

    Provides standard response serializer callbacks.

    Inheritance
    Object
    ResponseSerializer
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO
    Syntax
    public static class ResponseSerializer

    Fields

    Default

    The default response serializer callback used by EmbedIO.

    Equivalent to Json(IHttpContext, Object).

    Declaration
    public static readonly ResponseSerializerCallback Default
    Field Value
    Type Description
    ResponseSerializerCallback

    Methods

    Json(IHttpContext, Object)

    Serializes data in JSON format to a HTTP response, using the utility class.

    Declaration
    public static Task Json(IHttpContext context, object data)
    Parameters
    Type Name Description
    IHttpContext context

    The HTTP context of the request.

    Object data

    The data to serialize.

    Returns
    Type Description
    Task

    A representing the ongoing operation.

    Json(JsonSerializerCase)

    Serializes data in JSON format with the specified jsonSerializerCase to a HTTP response, using the utility class.

    Declaration
    public static ResponseSerializerCallback Json(JsonSerializerCase jsonSerializerCase)
    Parameters
    Type Name Description
    JsonSerializerCase jsonSerializerCase

    The JSON serializer case.

    Returns
    Type Description
    ResponseSerializerCallback

    A ResponseSerializerCallback that can be used to serialize data to a HTTP response.

    Json(SerializerOptions)

    Serializes data in JSON format with the specified serializerOptions to a HTTP response, using the utility class.

    Declaration
    public static ResponseSerializerCallback Json(SerializerOptions serializerOptions)
    Parameters
    Type Name Description
    SerializerOptions serializerOptions

    The JSON serializer options.

    Returns
    Type Description
    ResponseSerializerCallback

    A ResponseSerializerCallback that can be used to serialize data to a HTTP response.

    See Also

    ResponseSerializerCallback

    Comments

    Back to top Copyright © 2017-2019 Unosquare