Show / Hide Table of Contents

    Class JsonFormatter

    Serializes and deserializes an object, in JSON format.

    Inheritance
    System.Object
    Formatter<Stream>
    JsonFormatter
    Inherited Members
    Formatter<Stream>.Serialize(Object)
    Formatter<Stream>.Deserialize<T>(Stream)
    Namespace: Cuemon.Serialization.Json.Formatters
    Assembly: Cuemon.Serialization.Json.dll
    Syntax
    public class JsonFormatter : Formatter<Stream>

    Constructors

    | Improve this Doc

    JsonFormatter()

    Initializes a new instance of the JsonFormatter class.

    Declaration
    public JsonFormatter()
    | Improve this Doc

    JsonFormatter(Action<JsonFormatterOptions>)

    Initializes a new instance of the JsonFormatter class.

    Declaration
    public JsonFormatter(Action<JsonFormatterOptions> setup)
    Parameters
    Type Name Description
    Action<JsonFormatterOptions> setup

    The JsonFormatterOptions which need to be configured.

    | Improve this Doc

    JsonFormatter(JsonFormatterOptions)

    Initializes a new instance of the JsonFormatter class.

    Declaration
    public JsonFormatter(JsonFormatterOptions options)
    Parameters
    Type Name Description
    JsonFormatterOptions options

    The configured JsonFormatterOptions.

    Properties

    | Improve this Doc

    Options

    Gets the configured options of this JsonFormatter.

    Declaration
    protected JsonFormatterOptions Options { get; }
    Property Value
    Type Description
    JsonFormatterOptions

    The configured options of this JsonFormatter.

    Methods

    | Improve this Doc

    Deserialize(Stream, Type)

    Deserializes the specified value into an object of objectType.

    Declaration
    public override object Deserialize(Stream value, Type objectType)
    Parameters
    Type Name Description
    Stream value

    The string from which to deserialize the object graph.

    Type objectType

    The type of the deserialized object.

    Returns
    Type Description
    System.Object

    An object of objectType.

    | Improve this Doc

    Serialize(Object, Type)

    Serializes the specified source to an object of .

    Declaration
    public override Stream Serialize(object source, Type objectType)
    Parameters
    Type Name Description
    System.Object source

    The object to serialize to JSON format.

    Type objectType

    The type of the object to serialize.

    Returns
    Type Description
    Stream

    A string of the serialized source.

    See Also

    Formatter<TFormat>
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX