BsonWriter Class

Json.NET

Json.NET - Quick Starts & API Documentation BsonWriter Class
NamespacesNewtonsoft.Json.BsonBsonWriter
Represents a writer that provides a fast, non-cached, forward-only way of generating Json data.
Declaration Syntax
C# Visual Basic Visual C++
public class BsonWriter : JsonWriter
Public Class BsonWriter _
	Inherits JsonWriter
public ref class BsonWriter : public JsonWriter
Members
All Members Constructors Methods Properties



Icon Member Description
BsonWriter(Stream)
Initializes a new instance of the BsonWriter class.

BsonWriter(BinaryWriter)
Initializes a new instance of the BsonWriter class.

Close()()()()
Closes this stream and the underlying stream.
(Overrides JsonWriter.Close()()()().)
CloseOutput
Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the writer is closed.
(Inherited from JsonWriter.)
DateFormatHandling
Get or set how dates are written to JSON text.
(Inherited from JsonWriter.)
DateTimeKindHandling
Gets or sets the DateTimeKind used when writing DateTime values to BSON. When set to Unspecified no conversion will occur.

DateTimeZoneHandling
Get or set how DateTime time zones are handling when writing JSON.
(Inherited from JsonWriter.)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Flush()()()()
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
(Overrides JsonWriter.Flush()()()().)
Formatting
Indicates how JSON text output is formatted.
(Inherited from JsonWriter.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Path
Gets the path of the writer.
(Inherited from JsonWriter.)
Top
Gets the top.
(Inherited from JsonWriter.)
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
WriteComment(String)
Writes out a comment
CopyC#
/*...*/
containing the specified text.
(Overrides JsonWriter.WriteComment(String).)
WriteEnd(JsonToken)
Writes the end.
(Overrides JsonWriter.WriteEnd(JsonToken).)
WriteEnd()()()()
Writes the end of the current Json object or array.
(Inherited from JsonWriter.)
WriteEndArray()()()()
Writes the end of an array.
(Inherited from JsonWriter.)
WriteEndConstructor()()()()
Writes the end constructor.
(Inherited from JsonWriter.)
WriteEndObject()()()()
Writes the end of a Json object.
(Inherited from JsonWriter.)
WriteIndent()()()()
Writes indent characters.
(Inherited from JsonWriter.)
WriteIndentSpace()()()()
Writes an indent space.
(Inherited from JsonWriter.)
WriteNull()()()()
Writes a null value.
(Overrides JsonWriter.WriteNull()()()().)
WriteObjectId(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value that represents a BSON object id.

WritePropertyName(String)
Writes the property name of a name/value pair on a Json object.
(Overrides JsonWriter.WritePropertyName(String).)
WriteRaw(String)
Writes raw JSON.
(Overrides JsonWriter.WriteRaw(String).)
WriteRawValue(String)
Writes raw JSON where a value is expected and updates the writer's state.
(Overrides JsonWriter.WriteRawValue(String).)
WriteRegex(String, String)
Writes a BSON regex.

WriteStartArray()()()()
Writes the beginning of a Json array.
(Overrides JsonWriter.WriteStartArray()()()().)
WriteStartConstructor(String)
Writes the start of a constructor with the given name.
(Overrides JsonWriter.WriteStartConstructor(String).)
WriteStartObject()()()()
Writes the beginning of a Json object.
(Overrides JsonWriter.WriteStartObject()()()().)
WriteState
Gets the state of the writer.
(Inherited from JsonWriter.)
WriteToken(JsonReader)
Writes the current JsonReader token.
(Inherited from JsonWriter.)
WriteUndefined()()()()
Writes an undefined value.
(Overrides JsonWriter.WriteUndefined()()()().)
WriteValue(String)
Writes a String value.
(Overrides JsonWriter.WriteValue(String).)
WriteValue(Int32)
Writes a Int32 value.
(Overrides JsonWriter.WriteValue(Int32).)
WriteValue(UInt32)
Writes a UInt32 value.
(Overrides JsonWriter.WriteValue(UInt32).)
WriteValue(Int64)
Writes a Int64 value.
(Overrides JsonWriter.WriteValue(Int64).)
WriteValue(UInt64)
Writes a UInt64 value.
(Overrides JsonWriter.WriteValue(UInt64).)
WriteValue(Single)
Writes a Single value.
(Overrides JsonWriter.WriteValue(Single).)
WriteValue(Double)
Writes a Double value.
(Overrides JsonWriter.WriteValue(Double).)
WriteValue(Boolean)
Writes a Boolean value.
(Overrides JsonWriter.WriteValue(Boolean).)
WriteValue(Int16)
Writes a Int16 value.
(Overrides JsonWriter.WriteValue(Int16).)
WriteValue(UInt16)
Writes a UInt16 value.
(Overrides JsonWriter.WriteValue(UInt16).)
WriteValue(Char)
Writes a Char value.
(Overrides JsonWriter.WriteValue(Char).)
WriteValue(Byte)
Writes a Byte value.
(Overrides JsonWriter.WriteValue(Byte).)
WriteValue(SByte)
Writes a SByte value.
(Overrides JsonWriter.WriteValue(SByte).)
WriteValue(Decimal)
Writes a Decimal value.
(Overrides JsonWriter.WriteValue(Decimal).)
WriteValue(DateTime)
Writes a DateTime value.
(Overrides JsonWriter.WriteValue(DateTime).)
WriteValue(DateTimeOffset)
Writes a DateTimeOffset value.
(Overrides JsonWriter.WriteValue(DateTimeOffset).)
WriteValue(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value.
(Overrides JsonWriter.WriteValue(array<Byte>[]()[][]).)
WriteValue(Guid)
Writes a Guid value.
(Overrides JsonWriter.WriteValue(Guid).)
WriteValue(TimeSpan)
Writes a TimeSpan value.
(Overrides JsonWriter.WriteValue(TimeSpan).)
WriteValue(Uri)
Writes a Uri value.
(Overrides JsonWriter.WriteValue(Uri).)
WriteValue(Nullable<(Of <<'(Int32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Int64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Single>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Double>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Boolean>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Int16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Char>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Byte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(SByte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Decimal>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(DateTime>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(DateTimeOffset>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Guid>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(TimeSpan>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Object)
Writes a Object value. An error will raised if the value cannot be written as a single JSON token.
(Inherited from JsonWriter.)
WriteValueDelimiter()()()()
Writes the JSON value delimiter.
(Inherited from JsonWriter.)
WriteWhitespace(String)
Writes out the given white space.
(Inherited from JsonWriter.)
Inheritance Hierarchy
Object
JsonWriter
  BsonWriter

Assembly: Newtonsoft.Json (Module: Newtonsoft.Json) Version: 4.5.0.0 (4.5.6.14930)