Click or drag to resize
Json.NET

BsonReader Class

 

Note: This API is now obsolete.

Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
Inheritance Hierarchy

Namespace:  Newtonsoft.Json.Bson
Assembly:  Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntax
C#
[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 BsonReader : JsonReader

The BsonReader type exposes the following members.

Constructors
  NameDescription
Public methodBsonReader(BinaryReader)
Initializes a new instance of the BsonReader class.
Public methodBsonReader(Stream)
Initializes a new instance of the BsonReader class.
Public methodBsonReader(BinaryReader, Boolean, DateTimeKind)
Initializes a new instance of the BsonReader class.
Public methodBsonReader(Stream, Boolean, DateTimeKind)
Initializes a new instance of the BsonReader class.
Top
Properties
  NameDescription
Public propertyCloseInput
Gets or sets a value indicating whether the source should be closed when this reader is closed.
(Inherited from JsonReader.)
Public propertyCulture
Gets or sets the culture used when reading JSON. Defaults to InvariantCulture.
(Inherited from JsonReader.)
Protected propertyCurrentState
Gets the current reader state.
(Inherited from JsonReader.)
Public propertyDateFormatString
Gets or sets how custom date formatted strings are parsed when reading JSON.
(Inherited from JsonReader.)
Public propertyDateParseHandling
Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
(Inherited from JsonReader.)
Public propertyDateTimeKindHandling
Gets or sets the DateTimeKind used when reading DateTime values from BSON.
Public propertyDateTimeZoneHandling
Gets or sets how DateTime time zones are handled when reading JSON.
(Inherited from JsonReader.)
Public propertyDepth
Gets the depth of the current token in the JSON document.
(Inherited from JsonReader.)
Public propertyFloatParseHandling
Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
(Inherited from JsonReader.)
Public propertyJsonNet35BinaryCompatibility Obsolete.
Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary.
Public propertyMaxDepth
Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a JsonReaderException.
(Inherited from JsonReader.)
Public propertyPath
Gets the path of the current JSON token.
(Inherited from JsonReader.)
Public propertyQuoteChar
Gets the quotation mark character used to enclose the value of a string.
(Inherited from JsonReader.)
Public propertyReadRootValueAsArray
Gets or sets a value indicating whether the root object will be read as a JSON array.
Public propertySupportMultipleContent
Gets or sets a value indicating whether multiple pieces of JSON content can be read from a continuous stream without erroring.
(Inherited from JsonReader.)
Public propertyTokenType
Gets the type of the current JSON token.
(Inherited from JsonReader.)
Public propertyValue
Gets the text value of the current JSON token.
(Inherited from JsonReader.)
Public propertyValueType
Gets the .NET type for the current JSON token.
(Inherited from JsonReader.)
Top
Methods
  NameDescription
Public methodClose
Changes the reader's state to Closed. If CloseInput is set to true, the underlying Stream is also closed.
(Overrides JsonReaderClose.)
Protected methodDispose
Releases unmanaged and - optionally - managed resources.
(Inherited from JsonReader.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRead
Reads the next JSON token from the underlying Stream.
(Overrides JsonReaderRead.)
Public methodReadAsBoolean (Inherited from JsonReader.)
Public methodReadAsBooleanAsync (Inherited from JsonReader.)
Public methodReadAsBytes
Reads the next JSON token from the source as a Byte[].
(Inherited from JsonReader.)
Public methodReadAsBytesAsync
Asynchronously reads the next JSON token from the source as a Byte[].
(Inherited from JsonReader.)
Public methodReadAsDateTime (Inherited from JsonReader.)
Public methodReadAsDateTimeAsync (Inherited from JsonReader.)
Public methodReadAsDateTimeOffset (Inherited from JsonReader.)
Public methodReadAsDateTimeOffsetAsync (Inherited from JsonReader.)
Public methodReadAsDecimal (Inherited from JsonReader.)
Public methodReadAsDecimalAsync (Inherited from JsonReader.)
Public methodReadAsDouble (Inherited from JsonReader.)
Public methodReadAsDoubleAsync (Inherited from JsonReader.)
Public methodReadAsInt32 (Inherited from JsonReader.)
Public methodReadAsInt32Async (Inherited from JsonReader.)
Public methodReadAsString
Reads the next JSON token from the source as a String.
(Inherited from JsonReader.)
Public methodReadAsStringAsync
Asynchronously reads the next JSON token from the source as a String.
(Inherited from JsonReader.)
Public methodReadAsync
Asynchronously reads the next JSON token from the source.
(Inherited from JsonReader.)
Protected methodSetStateBasedOnCurrent
Sets the state based on current token type.
(Inherited from JsonReader.)
Protected methodSetToken(JsonToken)
Sets the current token.
(Inherited from JsonReader.)
Protected methodSetToken(JsonToken, Object)
Sets the current token and value.
(Inherited from JsonReader.)
Protected methodSetToken(JsonToken, Object, Boolean)
Sets the current token and value.
(Inherited from JsonReader.)
Public methodSkip
Skips the children of the current token.
(Inherited from JsonReader.)
Public methodSkipAsync
Asynchronously skips the children of the current token.
(Inherited from JsonReader.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also