JsonReader ClassMongoDB C# Driver API Documentation
Represents a BSON reader for a JSON string.
Inheritance Hierarchy

SystemObject
  MongoDB.Bson.IOBsonReader
    MongoDB.Bson.IOJsonReader

Namespace: MongoDB.Bson.IO
Assembly: MongoDB.Bson (in MongoDB.Bson.dll) Version: { version: '1.11.0.92', semver: '1.11.0', commit: '791a16588d4a8b3b118a8b3b57cfa436fec5d3da', commitDate: '2015-12-08 22:55:45' }
Syntax

public class JsonReader : BsonReader

The JsonReader type exposes the following members.

Constructors

  NameDescription
Public methodJsonReader
Initializes a new instance of the JsonReader class.
Top
Methods

  NameDescription
Public methodClose
Closes the reader.
(Overrides BsonReaderClose.)
Public methodDispose
Disposes of any resources used by the reader.
(Inherited from BsonReader.)
Protected methodDispose(Boolean)
Disposes of any resources used by the reader.
(Overrides BsonReaderDispose(Boolean).)
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 methodFindElement
Positions the reader to an element by name.
(Inherited from BsonReader.)
Public methodFindStringElement
Positions the reader to a string element by name.
(Inherited from BsonReader.)
Public methodGetBookmark
Gets a bookmark to the reader's current position and state.
(Overrides BsonReaderGetBookmark.)
Public methodGetCurrentBsonType
Gets the current BsonType (calls ReadBsonType if necessary).
(Inherited from BsonReader.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(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 methodReadBinaryData
Reads BSON binary data from the reader.
(Overrides BsonReaderReadBinaryData.)
Public methodReadBinaryData(String)
Reads a BSON binary data element from the reader.
(Inherited from BsonReader.)
Public methodReadBinaryData(Byte, BsonBinarySubType) Obsolete.
Reads BSON binary data from the reader.
(Inherited from BsonReader.)
Public methodReadBinaryData(Byte, BsonBinarySubType, GuidRepresentation) Obsolete.
Reads BSON binary data from the reader.
(Inherited from BsonReader.)
Public methodReadBinaryData(String, Byte, BsonBinarySubType) Obsolete.
Reads a BSON binary data element from the reader.
(Inherited from BsonReader.)
Public methodReadBinaryData(String, Byte, BsonBinarySubType, GuidRepresentation) Obsolete.
Reads a BSON binary data element from the reader.
(Inherited from BsonReader.)
Public methodReadBoolean
Reads a BSON boolean from the reader.
(Overrides BsonReaderReadBoolean.)
Public methodReadBoolean(String)
Reads a BSON boolean element from the reader.
(Inherited from BsonReader.)
Public methodReadBsonType
Reads a BsonType from the reader.
(Inherited from BsonReader.)
Public methodReadBsonTypeTValue(BsonTrieTValue, Boolean, TValue)
Reads a BsonType from the reader.
(Inherited from BsonReader.)
Public methodReadBsonTypeTValue(BsonTrieTValue, Boolean, TValue)
Reads a BsonType from the reader.
(Overrides BsonReaderReadBsonTypeTValue(BsonTrieTValue, Boolean, TValue).)
Public methodReadBytes
Reads BSON binary data from the reader.
(Overrides BsonReaderReadBytes.)
Public methodReadBytes(String)
Reads a BSON binary data element from the reader.
(Inherited from BsonReader.)
Public methodReadDateTime
Reads a BSON DateTime from the reader.
(Overrides BsonReaderReadDateTime.)
Public methodReadDateTime(String)
Reads a BSON DateTime element from the reader.
(Inherited from BsonReader.)
Public methodReadDouble
Reads a BSON Double from the reader.
(Overrides BsonReaderReadDouble.)
Public methodReadDouble(String)
Reads a BSON Double element from the reader.
(Inherited from BsonReader.)
Public methodReadEndArray
Reads the end of a BSON array from the reader.
(Overrides BsonReaderReadEndArray.)
Public methodReadEndDocument
Reads the end of a BSON document from the reader.
(Overrides BsonReaderReadEndDocument.)
Public methodReadInt32
Reads a BSON Int32 from the reader.
(Overrides BsonReaderReadInt32.)
Public methodReadInt32(String)
Reads a BSON Int32 element from the reader.
(Inherited from BsonReader.)
Public methodReadInt64
Reads a BSON Int64 from the reader.
(Overrides BsonReaderReadInt64.)
Public methodReadInt64(String)
Reads a BSON Int64 element from the reader.
(Inherited from BsonReader.)
Public methodReadJavaScript
Reads a BSON JavaScript from the reader.
(Overrides BsonReaderReadJavaScript.)
Public methodReadJavaScript(String)
Reads a BSON JavaScript element from the reader.
(Inherited from BsonReader.)
Public methodReadJavaScriptWithScope
Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope).
(Overrides BsonReaderReadJavaScriptWithScope.)
Public methodReadJavaScriptWithScope(String)
Reads a BSON JavaScript with scope element from the reader (call ReadStartDocument next to read the scope).
(Inherited from BsonReader.)
Public methodReadMaxKey
Reads a BSON MaxKey from the reader.
(Overrides BsonReaderReadMaxKey.)
Public methodReadMaxKey(String)
Reads a BSON MaxKey element from the reader.
(Inherited from BsonReader.)
Public methodReadMinKey
Reads a BSON MinKey from the reader.
(Overrides BsonReaderReadMinKey.)
Public methodReadMinKey(String)
Reads a BSON MinKey element from the reader.
(Inherited from BsonReader.)
Public methodReadName
Reads the name of an element from the reader.
(Inherited from BsonReader.)
Public methodReadName(String)
Reads the name of an element from the reader.
(Inherited from BsonReader.)
Public methodReadNull
Reads a BSON null from the reader.
(Overrides BsonReaderReadNull.)
Public methodReadNull(String)
Reads a BSON null element from the reader.
(Inherited from BsonReader.)
Public methodReadObjectId
Reads a BSON ObjectId from the reader.
(Overrides BsonReaderReadObjectId.)
Public methodReadObjectId(String)
Reads a BSON ObjectId element from the reader.
(Inherited from BsonReader.)
Public methodReadObjectId(Int32, Int32, Int16, Int32) Obsolete.
Reads a BSON ObjectId from the reader.
(Inherited from BsonReader.)
Public methodReadObjectId(String, Int32, Int32, Int16, Int32) Obsolete.
Reads a BSON ObjectId element from the reader.
(Inherited from BsonReader.)
Public methodReadRawBsonArray
Reads a raw BSON array.
(Inherited from BsonReader.)
Public methodReadRawBsonArray(String)
Reads a raw BSON array.
(Inherited from BsonReader.)
Public methodReadRawBsonDocument
Reads a raw BSON document.
(Inherited from BsonReader.)
Public methodReadRawBsonDocument(String)
Reads a raw BSON document.
(Inherited from BsonReader.)
Public methodReadRegularExpression
Reads a BSON regular expression from the reader.
(Overrides BsonReaderReadRegularExpression.)
Public methodReadRegularExpression(String)
Reads a BSON regular expression element from the reader.
(Inherited from BsonReader.)
Public methodReadRegularExpression(String, String) Obsolete.
Reads a BSON regular expression from the reader.
(Inherited from BsonReader.)
Public methodReadRegularExpression(String, String, String) Obsolete.
Reads a BSON regular expression element from the reader.
(Inherited from BsonReader.)
Public methodReadStartArray
Reads the start of a BSON array.
(Overrides BsonReaderReadStartArray.)
Public methodReadStartDocument
Reads the start of a BSON document.
(Overrides BsonReaderReadStartDocument.)
Public methodReadString
Reads a BSON string from the reader.
(Overrides BsonReaderReadString.)
Public methodReadString(String)
Reads a BSON string element from the reader.
(Inherited from BsonReader.)
Public methodReadSymbol
Reads a BSON symbol from the reader.
(Overrides BsonReaderReadSymbol.)
Public methodReadSymbol(String)
Reads a BSON symbol element from the reader.
(Inherited from BsonReader.)
Public methodReadTimestamp
Reads a BSON timestamp from the reader.
(Overrides BsonReaderReadTimestamp.)
Public methodReadTimestamp(String)
Reads a BSON timestamp element from the reader.
(Inherited from BsonReader.)
Public methodReadUndefined
Reads a BSON undefined from the reader.
(Overrides BsonReaderReadUndefined.)
Public methodReadUndefined(String)
Reads a BSON undefined element from the reader.
(Inherited from BsonReader.)
Public methodReturnToBookmark
Returns the reader to previously bookmarked position and state.
(Overrides BsonReaderReturnToBookmark(BsonReaderBookmark).)
Public methodSkipName
Skips the name (reader must be positioned on a name).
(Overrides BsonReaderSkipName.)
Public methodSkipValue
Skips the value (reader must be positioned on a value).
(Overrides BsonReaderSkipValue.)
Protected methodThrowInvalidContextType
Throws an InvalidOperationException when the method called is not valid for the current ContextType.
(Inherited from BsonReader.)
Protected methodThrowInvalidState
Throws an InvalidOperationException when the method called is not valid for the current state.
(Inherited from BsonReader.)
Protected methodThrowObjectDisposedException
Throws an ObjectDisposedException.
(Inherited from BsonReader.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodVerifyBsonType
Verifies the current state and BsonType of the reader.
(Inherited from BsonReader.)
Protected methodVerifyName
Verifies the name of the current element.
(Inherited from BsonReader.)
Top
Extension Methods

  NameDescription
Public Extension MethodToBson(Type)Overloaded.
Converts an object to a BSON document byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBson(Type, IBsonSerializationOptions)Overloaded.
Converts an object to a BSON document byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBson(Type, BsonBinaryWriterSettings)Overloaded.
Converts an object to a BSON document byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBson(Type, IBsonSerializationOptions, BsonBinaryWriterSettings)Overloaded.
Converts an object to a BSON document byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument(Type)Overloaded.
Converts an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument(Type, IBsonSerializationOptions)Overloaded.
Converts an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson(Type)Overloaded.
Converts an object to a JSON string.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson(Type, IBsonSerializationOptions)Overloaded.
Converts an object to a JSON string.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson(Type, JsonWriterSettings)Overloaded.
Converts an object to a JSON string.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson(Type, IBsonSerializationOptions, JsonWriterSettings)Overloaded.
Converts an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
Properties

  NameDescription
Public propertyCurrentBsonType
Gets the current BsonType.
(Inherited from BsonReader.)
Protected propertyCurrentName
Gets the current name.
(Inherited from BsonReader.)
Protected propertyDisposed
Gets whether the BsonReader has been disposed.
(Inherited from BsonReader.)
Public propertySettings
Gets the settings of the reader.
(Inherited from BsonReader.)
Public propertyState
Gets the current state of the reader.
(Inherited from BsonReader.)
Top
See Also

Reference