Description Usage Arguments Value See Also Examples
Get the number of bytes taken up by the BSON data attached to the mongo.bson object
1 |
b |
(mongo.bson) the mongo.bson object to examine. |
(integer) the number of bytes taken up by the BSON data attached to the mongo.bson object.
mongo.bson
1 2 3 4 5 6 7 8 9 | # should report 5
print(mongo.bson.size(mongo.bson.empty()))
buf <- mongo.bson.buffer.create()
mongo.bson.buffer.append(buf, "name", "Fred")
mongo.bson.buffer.append(buf, "city", "Dayton")
y <- mongo.bson.from.buffer(buf)
# should report 37
print(mongo.bson.size(y))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.