Table of Contents

Class JsonToken

Namespace
MongoDB.Bson.IO
Assembly
MongoDB.Bson.dll

Represents a JSON token.

public class JsonToken
Inheritance
JsonToken
Derived
Inherited Members
Extension Methods

Constructors

JsonToken(JsonTokenType, string)

Initializes a new instance of the JsonToken class.

public JsonToken(JsonTokenType type, string lexeme)

Parameters

type JsonTokenType

The token type.

lexeme string

The lexeme.

Properties

DateTimeValue

Gets the value of a DateTime token.

public virtual BsonDateTime DateTimeValue { get; }

Property Value

BsonDateTime

DoubleValue

Gets the value of a Double token.

public virtual double DoubleValue { get; }

Property Value

double

Int32Value

Gets the value of an Int32 token.

public virtual int Int32Value { get; }

Property Value

int

Int64Value

Gets the value of an Int64 token.

public virtual long Int64Value { get; }

Property Value

long

IsNumber

Gets a value indicating whether this token is number.

public virtual bool IsNumber { get; }

Property Value

bool

true if this token is number; otherwise, false.

Lexeme

Gets the lexeme.

public string Lexeme { get; }

Property Value

string

ObjectIdValue

Gets the value of an ObjectId token.

public virtual ObjectId ObjectIdValue { get; }

Property Value

ObjectId

RegularExpressionValue

Gets the value of a regular expression token.

public virtual BsonRegularExpression RegularExpressionValue { get; }

Property Value

BsonRegularExpression

StringValue

Gets the value of a string token.

public virtual string StringValue { get; }

Property Value

string

Type

Gets the token type.

public JsonTokenType Type { get; }

Property Value

JsonTokenType