Table of Contents

Class JsonWriterSettings

Namespace
MongoDB.Bson.IO
Assembly
MongoDB.Bson.dll

Represents settings for a JsonWriter.

[Serializable]
public class JsonWriterSettings : BsonWriterSettings
Inheritance
JsonWriterSettings
Inherited Members
Extension Methods

Constructors

JsonWriterSettings()

Initializes a new instance of the JsonWriterSettings class.

public JsonWriterSettings()

Properties

Defaults

Gets or sets the default JsonWriterSettings.

public static JsonWriterSettings Defaults { get; set; }

Property Value

JsonWriterSettings

Encoding

Gets or sets the output Encoding.

[Obsolete("Set the Encoding when you create a StreamWriter instead (this property is ignored).")]
public Encoding Encoding { get; set; }

Property Value

Encoding

Indent

Gets or sets whether to indent the output.

public bool Indent { get; set; }

Property Value

bool

IndentChars

Gets or sets the indent characters.

public string IndentChars { get; set; }

Property Value

string

NewLineChars

Gets or sets the new line characters.

public string NewLineChars { get; set; }

Property Value

string

OutputMode

Gets or sets the output mode.

public JsonOutputMode OutputMode { get; set; }

Property Value

JsonOutputMode

ShellVersion

Gets or sets the shell version (used with OutputMode Shell).

public Version ShellVersion { get; set; }

Property Value

Version

Methods

Clone()

Creates a clone of the settings.

public JsonWriterSettings Clone()

Returns

JsonWriterSettings

A clone of the settings.

CloneImplementation()

Creates a clone of the settings.

protected override BsonWriterSettings CloneImplementation()

Returns

BsonWriterSettings

A clone of the settings.