vibe.d beta banner
get vibe.d
0.7.31

Struct Bson

Represents a BSON value.

struct Bson;

Constructors

Constructors

NameDescription
thisCreates a new BSON value using raw data.
thisInitializes a new BSON value from the given D type.

Properties

Properties

NameTypeDescription
data[get]immutable(ubyte)[]Returns the raw data representing this BSON value (not including the field name and type).
emptyArray[get]BsonReturns a new, empty Bson value of type Array.
emptyObject[get]BsonReturns a new, empty Bson value of type Object.
get[get]TConverts the BSON value to a D value.
length[get]ulongReturns the length of a BSON value of type String, Array, Object or BinData.
type[get]Bson.TypeReturns the BSON type of this value.

Methods

Methods

NameDescription
byIndexValueIterates over all index/value pairs of an array.
byKeyValueIterates over all key/value pairs of an object.
byValueIterates over all values of an object or array.
fromJsonConverts a given JSON value to the corresponding BSON value.
isNull
opApplyAllows foreach iterating over BSON objects and arrays.
opAssignAssigns a D type to a BSON value.
opCastConverts the BSON value to a D value.
opEquals
opIndexAllows accessing fields of a BSON object using [].
opIndexAllows index based access of a BSON array value.
opIndexAssignAllows accessing fields of a BSON object using [].
optReturns the native type for this BSON if it matches the current runtime type.
removeRemoves an entry from a BSON obect.
toJsonConverts a BSON value to a JSON value.
toStringReturns a string representation of this BSON value in JSON format.
tryIndexCheck whether the BSON object contains the given key.

Enums

Enums

NameDescription
TypeRepresents the type of a BSON value
Authors

Sönke Ludwig

Copyright

© 2012-2015 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.