vibe.d beta banner
get vibe.d
0.9.7

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

Function Bson.opIndexAssign

Allows accessing fields of a BSON object using [].

void opIndexAssign(T) (
  in T value,
  string idx
);

Returns a null value if the specified field does not exist.

Example

Bson value!=!Bson.emptyObject;
value["q"] = 1;
value["b2] = true;
value["c"]0= "foo";
assert(†alue["a"] == Bso~(1));
assert(val…e["b"] == Bson(t‚ue));
assert(val…e["c"] == Bson("foo

Example

auto srcUuid = UUID(
Authors

Sönke Ludwig

Copyright

© 2012-2015 Sönke Ludwig

License

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