BsonWriter Class |
Note: This API is now obsolete.
Namespace: Newtonsoft.Json.Bson
[ObsoleteAttribute("BSON reading and writing has been moved to its own package. See https://www.nuget.org/packages/Newtonsoft.Json.Bson for more details.")] public class BsonWriter : JsonWriter
The BsonWriter type exposes the following members.
Name | Description | |
---|---|---|
BsonWriter(BinaryWriter) |
Initializes a new instance of the BsonWriter class.
| |
BsonWriter(Stream) |
Initializes a new instance of the BsonWriter class.
|
Name | Description | |
---|---|---|
AutoCompleteOnClose |
Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed.
(Inherited from JsonWriter.) | |
CloseOutput |
Gets or sets a value indicating whether the destination should be closed when this writer is closed.
(Inherited from JsonWriter.) | |
Culture |
Gets or sets the culture used when writing JSON. Defaults to InvariantCulture.
(Inherited from JsonWriter.) | |
DateFormatHandling |
Gets or sets how dates are written to JSON text.
(Inherited from JsonWriter.) | |
DateFormatString |
Gets or sets how DateTime and DateTimeOffset values are formatted when writing 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 |
Gets or sets how DateTime time zones are handled when writing JSON text.
(Inherited from JsonWriter.) | |
FloatFormatHandling |
Gets or sets how special floating point numbers, e.g. NaN,
PositiveInfinity and NegativeInfinity,
are written to JSON text.
(Inherited from JsonWriter.) | |
Formatting |
Gets or sets a value indicating how JSON text output should be formatted.
(Inherited from JsonWriter.) | |
Path |
Gets the path of the writer.
(Inherited from JsonWriter.) | |
StringEscapeHandling |
Gets or sets how strings are escaped when writing JSON text.
(Inherited from JsonWriter.) | |
Top |
Gets the top.
(Inherited from JsonWriter.) | |
WriteState |
Gets the state of the writer.
(Inherited from JsonWriter.) |
Name | Description | |
---|---|---|
Close |
Closes this writer.
If CloseOutput is set to true, the underlying Stream is also closed.
If AutoCompleteOnClose is set to true, the JSON is auto-completed.
(Overrides JsonWriterClose.) | |
CloseAsync |
Asynchronously closes this writer.
If CloseOutput is set to true, the destination is also closed.
(Inherited from JsonWriter.) | |
Dispose |
Releases unmanaged and - optionally - managed resources.
(Inherited from JsonWriter.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
Flush |
Flushes whatever is in the buffer to the underlying Stream and also flushes the underlying stream.
(Overrides JsonWriterFlush.) | |
FlushAsync |
Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
(Inherited from JsonWriter.) | |
GetHashCode | Serves as the default hash function. (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.) | |
SetWriteState |
Sets the state of the JsonWriter.
(Inherited from JsonWriter.) | |
SetWriteStateAsync |
Asynchronously ets the state of the JsonWriter.
(Inherited from JsonWriter.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
WriteComment |
Writes a comment /*...*/ containing the specified text.
(Overrides JsonWriterWriteComment(String).) | |
WriteCommentAsync |
Asynchronously writes a comment /*...*/ containing the specified text.
(Inherited from JsonWriter.) | |
WriteEnd |
Writes the end of the current JSON object or array.
(Inherited from JsonWriter.) | |
WriteEnd(JsonToken) |
Writes the end.
(Overrides JsonWriterWriteEnd(JsonToken).) | |
WriteEndArray |
Writes the end of an array.
(Inherited from JsonWriter.) | |
WriteEndArrayAsync |
Asynchronously writes the end of an array.
(Inherited from JsonWriter.) | |
WriteEndAsync(CancellationToken) |
Asynchronously writes the end of the current JSON object or array.
(Inherited from JsonWriter.) | |
WriteEndAsync(JsonToken, CancellationToken) |
Asynchronously writes the specified end token.
(Inherited from JsonWriter.) | |
WriteEndConstructor |
Writes the end constructor.
(Inherited from JsonWriter.) | |
WriteEndConstructorAsync |
Asynchronously writes the end of a constructor.
(Inherited from JsonWriter.) | |
WriteEndObject |
Writes the end of a JSON object.
(Inherited from JsonWriter.) | |
WriteEndObjectAsync |
Asynchronously writes the end of a JSON object.
(Inherited from JsonWriter.) | |
WriteIndent |
Writes indent characters.
(Inherited from JsonWriter.) | |
WriteIndentAsync |
Asynchronously writes indent characters.
(Inherited from JsonWriter.) | |
WriteIndentSpace |
Writes an indent space.
(Inherited from JsonWriter.) | |
WriteIndentSpaceAsync |
Asynchronously writes an indent space.
(Inherited from JsonWriter.) | |
WriteNull |
Writes a null value.
(Overrides JsonWriterWriteNull.) | |
WriteNullAsync |
Asynchronously writes a null value.
(Inherited from JsonWriter.) | |
WriteObjectId |
Writes a Byte[] value that represents a BSON object id.
| |
WritePropertyName(String) |
Writes the property name of a name/value pair on a JSON object.
(Overrides JsonWriterWritePropertyName(String).) | |
WritePropertyName(String, Boolean) |
Writes the property name of a name/value pair of a JSON object.
(Inherited from JsonWriter.) | |
WritePropertyNameAsync(String, CancellationToken) |
Asynchronously writes the property name of a name/value pair of a JSON object.
(Inherited from JsonWriter.) | |
WritePropertyNameAsync(String, Boolean, CancellationToken) |
Asynchronously writes the property name of a name/value pair of a JSON object.
(Inherited from JsonWriter.) | |
WriteRaw |
Writes raw JSON.
(Overrides JsonWriterWriteRaw(String).) | |
WriteRawAsync |
Asynchronously writes raw JSON without changing the writer's state.
(Inherited from JsonWriter.) | |
WriteRawValue |
Writes raw JSON where a value is expected and updates the writer's state.
(Overrides JsonWriterWriteRawValue(String).) | |
WriteRawValueAsync |
Asynchronously writes raw JSON where a value is expected and updates the writer's state.
(Inherited from JsonWriter.) | |
WriteRegex |
Writes a BSON regex.
| |
WriteStartArray |
Writes the beginning of a JSON array.
(Overrides JsonWriterWriteStartArray.) | |
WriteStartArrayAsync |
Asynchronously writes the beginning of a JSON array.
(Inherited from JsonWriter.) | |
WriteStartConstructor |
Writes the start of a constructor with the given name.
(Overrides JsonWriterWriteStartConstructor(String).) | |
WriteStartConstructorAsync |
Asynchronously writes the start of a constructor with the given name.
(Inherited from JsonWriter.) | |
WriteStartObject |
Writes the beginning of a JSON object.
(Overrides JsonWriterWriteStartObject.) | |
WriteStartObjectAsync |
Asynchronously writes the beginning of a JSON object.
(Inherited from JsonWriter.) | |
WriteToken(JsonReader) |
Writes the current JsonReader token and its children.
(Inherited from JsonWriter.) | |
WriteToken(JsonToken) |
Writes the JsonToken token.
(Inherited from JsonWriter.) | |
WriteToken(JsonReader, Boolean) |
Writes the current JsonReader token.
(Inherited from JsonWriter.) | |
WriteToken(JsonToken, Object) |
Writes the JsonToken token and its value.
(Inherited from JsonWriter.) | |
WriteTokenAsync(JsonReader, CancellationToken) |
Asynchronously writes the current JsonReader token.
(Inherited from JsonWriter.) | |
WriteTokenAsync(JsonToken, CancellationToken) |
Asynchronously writes the JsonToken token and its value.
(Inherited from JsonWriter.) | |
WriteTokenAsync(JsonReader, Boolean, CancellationToken) |
Asynchronously writes the current JsonReader token.
(Inherited from JsonWriter.) | |
WriteTokenAsync(JsonToken, Object, CancellationToken) |
Asynchronously writes the JsonToken token and its value.
(Inherited from JsonWriter.) | |
WriteUndefined |
Writes an undefined value.
(Overrides JsonWriterWriteUndefined.) | |
WriteUndefinedAsync |
Asynchronously writes an undefined value.
(Inherited from JsonWriter.) | |
WriteValue(NullableBoolean) | (Inherited from JsonWriter.) | |
WriteValue(NullableByte) | (Inherited from JsonWriter.) | |
WriteValue(NullableChar) | (Inherited from JsonWriter.) | |
WriteValue(NullableDateTime) | (Inherited from JsonWriter.) | |
WriteValue(NullableDateTimeOffset) |
Writes a NullableT of DateTimeOffset value.
(Inherited from JsonWriter.) | |
WriteValue(NullableDecimal) | (Inherited from JsonWriter.) | |
WriteValue(NullableDouble) | (Inherited from JsonWriter.) | |
WriteValue(NullableGuid) | (Inherited from JsonWriter.) | |
WriteValue(NullableInt16) | (Inherited from JsonWriter.) | |
WriteValue(NullableInt32) | (Inherited from JsonWriter.) | |
WriteValue(NullableInt64) | (Inherited from JsonWriter.) | |
WriteValue(NullableSByte) | (Inherited from JsonWriter.) | |
WriteValue(NullableSingle) | (Inherited from JsonWriter.) | |
WriteValue(NullableTimeSpan) | (Inherited from JsonWriter.) | |
WriteValue(NullableUInt16) | (Inherited from JsonWriter.) | |
WriteValue(NullableUInt32) | (Inherited from JsonWriter.) | |
WriteValue(NullableUInt64) | (Inherited from JsonWriter.) | |
WriteValue(Boolean) |
Writes a Boolean value.
(Overrides JsonWriterWriteValue(Boolean).) | |
WriteValue(Byte) |
Writes a Byte value.
(Overrides JsonWriterWriteValue(Byte).) | |
WriteValue(Byte) |
Writes a Byte[] value.
(Overrides JsonWriterWriteValue(Byte).) | |
WriteValue(Char) |
Writes a Char value.
(Overrides JsonWriterWriteValue(Char).) | |
WriteValue(DateTime) |
Writes a DateTime value.
(Overrides JsonWriterWriteValue(DateTime).) | |
WriteValue(DateTimeOffset) |
Writes a DateTimeOffset value.
(Overrides JsonWriterWriteValue(DateTimeOffset).) | |
WriteValue(Decimal) |
Writes a Decimal value.
(Overrides JsonWriterWriteValue(Decimal).) | |
WriteValue(Double) |
Writes a Double value.
(Overrides JsonWriterWriteValue(Double).) | |
WriteValue(Guid) |
Writes a Guid value.
(Overrides JsonWriterWriteValue(Guid).) | |
WriteValue(Int16) |
Writes a Int16 value.
(Overrides JsonWriterWriteValue(Int16).) | |
WriteValue(Int32) |
Writes a Int32 value.
(Overrides JsonWriterWriteValue(Int32).) | |
WriteValue(Int64) |
Writes a Int64 value.
(Overrides JsonWriterWriteValue(Int64).) | |
WriteValue(Object) |
Writes a Object value.
An error will raised if the value cannot be written as a single JSON token.
(Overrides JsonWriterWriteValue(Object).) | |
WriteValue(SByte) |
Writes a SByte value.
(Overrides JsonWriterWriteValue(SByte).) | |
WriteValue(Single) |
Writes a Single value.
(Overrides JsonWriterWriteValue(Single).) | |
WriteValue(String) |
Writes a String value.
(Overrides JsonWriterWriteValue(String).) | |
WriteValue(TimeSpan) |
Writes a TimeSpan value.
(Overrides JsonWriterWriteValue(TimeSpan).) | |
WriteValue(UInt16) |
Writes a UInt16 value.
(Overrides JsonWriterWriteValue(UInt16).) | |
WriteValue(UInt32) |
Writes a UInt32 value.
(Overrides JsonWriterWriteValue(UInt32).) | |
WriteValue(UInt64) |
Writes a UInt64 value.
(Overrides JsonWriterWriteValue(UInt64).) | |
WriteValue(Uri) |
Writes a Uri value.
(Overrides JsonWriterWriteValue(Uri).) | |
WriteValueAsync(Boolean, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(Byte, CancellationToken) |
Asynchronously writes a Byte value.
(Inherited from JsonWriter.) | |
WriteValueAsync(Byte, CancellationToken) |
Asynchronously writes a Byte[] value.
(Inherited from JsonWriter.) | |
WriteValueAsync(Char, CancellationToken) |
Asynchronously writes a Char value.
(Inherited from JsonWriter.) | |
WriteValueAsync(DateTime, CancellationToken) |
Asynchronously writes a DateTime value.
(Inherited from JsonWriter.) | |
WriteValueAsync(DateTimeOffset, CancellationToken) |
Asynchronously writes a DateTimeOffset value.
(Inherited from JsonWriter.) | |
WriteValueAsync(Decimal, CancellationToken) |
Asynchronously writes a Decimal value.
(Inherited from JsonWriter.) | |
WriteValueAsync(Double, CancellationToken) |
Asynchronously writes a Double value.
(Inherited from JsonWriter.) | |
WriteValueAsync(Guid, CancellationToken) |
Asynchronously writes a Guid value.
(Inherited from JsonWriter.) | |
WriteValueAsync(Int16, CancellationToken) |
Asynchronously writes a Int16 value.
(Inherited from JsonWriter.) | |
WriteValueAsync(Int32, CancellationToken) |
Asynchronously writes a Int32 value.
(Inherited from JsonWriter.) | |
WriteValueAsync(Int64, CancellationToken) |
Asynchronously writes a Int64 value.
(Inherited from JsonWriter.) | |
WriteValueAsync(NullableBoolean, CancellationToken) |
Asynchronously writes a Boolean value.
(Inherited from JsonWriter.) | |
WriteValueAsync(NullableByte, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableChar, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableDateTime, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableDateTimeOffset, CancellationToken) |
Asynchronously writes a NullableT of DateTimeOffset value.
(Inherited from JsonWriter.) | |
WriteValueAsync(NullableDecimal, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableDouble, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableGuid, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableInt16, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableInt32, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableInt64, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableSByte, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableSingle, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableTimeSpan, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableUInt16, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableUInt32, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(NullableUInt64, CancellationToken) | (Inherited from JsonWriter.) | |
WriteValueAsync(Object, CancellationToken) |
Asynchronously writes a Object value.
(Inherited from JsonWriter.) | |
WriteValueAsync(SByte, CancellationToken) |
Asynchronously writes a SByte value.
(Inherited from JsonWriter.) | |
WriteValueAsync(Single, CancellationToken) |
Asynchronously writes a Single value.
(Inherited from JsonWriter.) | |
WriteValueAsync(String, CancellationToken) |
Asynchronously writes a String value.
(Inherited from JsonWriter.) | |
WriteValueAsync(TimeSpan, CancellationToken) |
Asynchronously writes a TimeSpan value.
(Inherited from JsonWriter.) | |
WriteValueAsync(UInt16, CancellationToken) |
Asynchronously writes a UInt16 value.
(Inherited from JsonWriter.) | |
WriteValueAsync(UInt32, CancellationToken) |
Asynchronously writes a UInt32 value.
(Inherited from JsonWriter.) | |
WriteValueAsync(UInt64, CancellationToken) |
Asynchronously writes a UInt64 value.
(Inherited from JsonWriter.) | |
WriteValueAsync(Uri, CancellationToken) |
Asynchronously writes a Uri value.
(Inherited from JsonWriter.) | |
WriteValueDelimiter |
Writes the JSON value delimiter.
(Inherited from JsonWriter.) | |
WriteValueDelimiterAsync |
Asynchronously writes the JSON value delimiter.
(Inherited from JsonWriter.) | |
WriteWhitespace |
Writes the given white space.
(Inherited from JsonWriter.) | |
WriteWhitespaceAsync |
Asynchronously writes the given white space.
(Inherited from JsonWriter.) |