vibe.d beta banner
get vibe.d
0.8.4

Asynchronous I/O that doesn’t get in your way, written in D

Struct Bson

Represents a BSON value.

struct Bson ;

Constructors

NameDescription
this Creates a new BSON value using raw data.
this Initializes a new BSON value from the given D type.

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

NameDescription
fromJson Converts a given JSON value to the corresponding BSON 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.
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.
remove Removes an entry from a BSON obect.
toJson Converts a BSON value to a JSON value.
toString Returns a string representation of this BSON value in JSON format.
tryIndex Check whether the BSON object contains the given key.

Enums

NameDescription
Type Represents 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.