JsonReader Class (original) (raw)

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: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed

Syntax

C#

VB

F#

Copy

public class JsonReader : BsonReader

Public Class JsonReader Inherits BsonReader

type JsonReader =
class inherit BsonReader end

The JsonReader type exposes the following members.

Constructors

| | Name | Description | | | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------- | | Public method | JsonReader(TextReader) | Initializes a new instance of the JsonReader class. | | Public method | JsonReader(String) | Initializes a new instance of the JsonReader class. | | Public method | JsonReader(TextReader, JsonReaderSettings) | Initializes a new instance of the JsonReader class. | | Public method | JsonReader(String, JsonReaderSettings) | Initializes a new instance of the JsonReader class. |

Top

Properties

| | Name | Description | | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | Public property | CurrentBsonType | Gets the current BsonType. (Inherited from BsonReader.) | | Protected property | CurrentName | Gets the current name. (Inherited from BsonReader.) | | Protected property | Disposed | Gets whether the BsonReader has been disposed. (Inherited from BsonReader.) | | Public property | Settings | Gets the settings of the reader. (Inherited from BsonReader.) | | Public property | State | Gets the current state of the reader. (Inherited from BsonReader.) |

Top

Methods

| | Name | Description | | | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Public method | Close | Closes the reader. (Overrides BsonReaderClose.) | | Public method | Dispose | Disposes of any resources used by the reader. (Inherited from BsonReader.) | | Protected method | Dispose(Boolean) | Disposes of any resources used by the reader. (Overrides BsonReaderDispose(Boolean).) | | Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | | Protected method | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | | Public method | GetBookmark | Gets a bookmark to the reader's current position and state. (Overrides BsonReaderGetBookmark.) | | Public method | GetCurrentBsonType | Gets the current BsonType (calls ReadBsonType if necessary). (Inherited from BsonReader.) | | Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.) | | Public method | GetType | Gets the Type of the current instance. (Inherited from Object.) | | Public method | IsAtEndOfFile | Determines whether this reader is at end of file. (Overrides BsonReaderIsAtEndOfFile.) | | Protected method | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | | Public method | ReadBinaryData | Reads BSON binary data from the reader. (Overrides BsonReaderReadBinaryData.) | | Public method | ReadBoolean | Reads a BSON boolean from the reader. (Overrides BsonReaderReadBoolean.) | | Public method | ReadBsonType | Reads a BsonType from the reader. (Overrides BsonReaderReadBsonType.) | | Public method | ReadBytes | Reads BSON binary data from the reader. (Overrides BsonReaderReadBytes.) | | Public method | ReadDateTime | Reads a BSON DateTime from the reader. (Overrides BsonReaderReadDateTime.) | | Public method | ReadDecimal128 | Reads a BSON Decimal128 from the reader. (Overrides BsonReaderReadDecimal128.) | | Public method | ReadDouble | Reads a BSON Double from the reader. (Overrides BsonReaderReadDouble.) | | Public method | ReadEndArray | Reads the end of a BSON array from the reader. (Overrides BsonReaderReadEndArray.) | | Public method | ReadEndDocument | Reads the end of a BSON document from the reader. (Overrides BsonReaderReadEndDocument.) | | Public method | ReadInt32 | Reads a BSON Int32 from the reader. (Overrides BsonReaderReadInt32.) | | Public method | ReadInt64 | Reads a BSON Int64 from the reader. (Overrides BsonReaderReadInt64.) | | Public method | ReadJavaScript | Reads a BSON JavaScript from the reader. (Overrides BsonReaderReadJavaScript.) | | Public method | ReadJavaScriptWithScope | Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope). (Overrides BsonReaderReadJavaScriptWithScope.) | | Public method | ReadMaxKey | Reads a BSON MaxKey from the reader. (Overrides BsonReaderReadMaxKey.) | | Public method | ReadMinKey | Reads a BSON MinKey from the reader. (Overrides BsonReaderReadMinKey.) | | Public method | ReadName | Reads the name of an element from the reader. (Inherited from BsonReader.) | | Public method | ReadName(INameDecoder) | Reads the name of an element from the reader. (Overrides BsonReaderReadName(INameDecoder).) | | Public method | ReadNull | Reads a BSON null from the reader. (Overrides BsonReaderReadNull.) | | Public method | ReadObjectId | Reads a BSON ObjectId from the reader. (Overrides BsonReaderReadObjectId.) | | Public method | ReadRawBsonArray | Reads a raw BSON array. (Inherited from BsonReader.) | | Public method | ReadRawBsonDocument | Reads a raw BSON document. (Inherited from BsonReader.) | | Public method | ReadRegularExpression | Reads a BSON regular expression from the reader. (Overrides BsonReaderReadRegularExpression.) | | Public method | ReadStartArray | Reads the start of a BSON array. (Overrides BsonReaderReadStartArray.) | | Public method | ReadStartDocument | Reads the start of a BSON document. (Overrides BsonReaderReadStartDocument.) | | Public method | ReadString | Reads a BSON string from the reader. (Overrides BsonReaderReadString.) | | Public method | ReadSymbol | Reads a BSON symbol from the reader. (Overrides BsonReaderReadSymbol.) | | Public method | ReadTimestamp | Reads a BSON timestamp from the reader. (Overrides BsonReaderReadTimestamp.) | | Public method | ReadUndefined | Reads a BSON undefined from the reader. (Overrides BsonReaderReadUndefined.) | | Public method | ReturnToBookmark | Returns the reader to previously bookmarked position and state. (Overrides BsonReaderReturnToBookmark(BsonReaderBookmark).) | | Public method | SkipName | Skips the name (reader must be positioned on a name). (Overrides BsonReaderSkipName.) | | Public method | SkipValue | Skips the value (reader must be positioned on a value). (Overrides BsonReaderSkipValue.) | | Protected method | ThrowInvalidContextType | Throws an InvalidOperationException when the method called is not valid for the current ContextType. (Inherited from BsonReader.) | | Protected method | ThrowInvalidState | Throws an InvalidOperationException when the method called is not valid for the current state. (Inherited from BsonReader.) | | Protected method | ThrowObjectDisposedException | Throws an ObjectDisposedException. (Inherited from BsonReader.) | | Public method | ToString | Returns a string that represents the current object. (Inherited from Object.) | | Protected method | VerifyBsonType | Verifies the current state and BsonType of the reader. (Inherited from BsonReader.) |

Top

Extension Methods

| | Name | Description | | | --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | Public Extension Method | ToBson | Serializes an object to a BSON byte array. (Defined by BsonExtensionMethods.) | | Public Extension Method | ToBsonDocument | Serializes an object to a BsonDocument. (Defined by BsonExtensionMethods.) | | Public Extension Method | ToJson | Serializes an object to a JSON string. (Defined by BsonExtensionMethods.) |

Top

See Also

Reference

MongoDB.Bson.IO Namespace