Struct Bson
Represents a BSON value.
Constructors
Name |
Description |
this
|
Initializes a new BSON value from the given D type .
|
this
|
Creates a new BSON value using raw data .
|
Properties
Name |
Type |
Description |
data
[get]
|
immutable(ubyte)[] |
Returns the raw data representing this BSON value (not including the field name and type ).
|
emptyArray
[get]
|
Bson |
Returns a new, empty Bson value of type Object.
|
emptyObject
[get]
|
Bson |
Returns a new, empty Bson value of type Object.
|
length
[get]
|
ulong |
Returns the length of a BSON value of type String, Array, Object or BinData.
|
type
[get]
|
Bson.Type |
Returns the BSON type of this value.
|
Methods
Name |
Description |
fromJson
|
Converts a given JSON value to the corresponding BSON value .
|
get
|
Converts the BSON value to a D value.
|
isNull
|
|
opApply
|
Allows foreach iterating over BSON objects and arrays.
|
opAssign
|
Assigns a D type to a BSON value .
|
opCast
|
Converts the BSON value to a D value.
|
opDispatch
|
Allows to access existing fields of a JSON object using dot syntax.
|
opEquals
|
|
opIndex
|
Allows accessing fields of a BSON object using [].
|
opIndex
|
Allows index based access of a BSON array value.
|
opIndexAssign
|
Allows accessing fields of a BSON object using [].
|
opt
|
Returns the native type for this BSON if it matches the current runtime type .
|
toJson
|
Converts a BSON value to a JSON value.
|
toString
|
Returns a string representation of this BSON value in JSON format.
|
Enums
Name |
Description |
Type
|
Represents the type of a BSON value
|
Copyright
© 2012 RejectedSoftware e.K.
License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.